firebase-authentication

How would I return a Firebase custom token if the generation of the custom token is asynchronous?

我与影子孤独终老i 提交于 2019-12-11 07:54:29
问题 I'm using the Spark Framework hosted on Heroku and I have this in my main : method in my server post("/token", (request, response) -> "Hello World"); That's working fine, however, I want to actually send a custom token, and not just "Hello World". So, logically, I would need this: FirebaseAuth auth = FirebaseAuth.getInstance(); String uid = UUID.randomUUID().toString(); post("/token", (request, response) -> auth.createCustomToken(uid)); However, createCustomToken returns a Task<String> and

Firebase Auth lastSignInDate and creationDate comparison failure

别说谁变了你拦得住时间么 提交于 2019-12-11 07:54:10
问题 First of all what I need in this case is knowing that this is the very first user's login (log in-after-sign up also counts as first) so I can add them to the database. For this purpose I have this check: func isNewUser(userMetadata: UserMetadata) -> Bool { return userMetadata.creationDate == userMetadata.lastSignInDate && !UserDefaults.standard.hasLoggedIn } I need the UserDefaults check because creationDate and lastSignInDate will be equal till the moment the user logs out. Everything

Unable to trger re-authentication with firebase v4, javascript

风流意气都作罢 提交于 2019-12-11 07:35:01
问题 I was previously able to trigger onAuthStateChanged without needing to sign user out after they verified their email using these methods called one after another. firebase.auth.currentUser.reload() firebase.auth.currentUser.getToken(true) I updated them to getIdToken firebase.auth.currentUser.reload() firebase.auth.currentUser.getIdToken(true) However with v4 of firebase previous and new approach are not re-triggering onAuthStateChange anymore. Is there a way to still achieve it now? i.e. for

Firebase Registration, Given String is empty or null

萝らか妹 提交于 2019-12-11 06:59:41
问题 Firebase Registration Error My app shuts down when I click the registration button. This is my Registration Button Code : mRegistration.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { final String email = mEmail.getText().toString(); final String password = mPassword.getText().toString(); mAuth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(DriverLoginActivity.this, new OnCompleteListener<AuthResult>() { @Override public void

Getting IllegalStateException when using Firebase in Android

吃可爱长大的小学妹 提交于 2019-12-11 06:57:52
问题 I'm trying to use google/facebook/email authentication using firebase but I'm facing this error. Caused by: java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat. This occurs when I put the following in my gradle file (Moudle App) compile 'com.firebaseui:firebase-ui:0.4.4' When I remove it, everything works fine. Here's the full error log in case some one wants it: 08-12 14:53:02.454 2643-2643/com.example

Android - How to filter the RecyclerView of Firebase?

走远了吗. 提交于 2019-12-11 06:47:12
问题 I've recently added a searchBar to my Android Firebase app, but I really can't find how to filter data in my app. I need to search in "title", "desc" and "username" childs, as seen in the photo. What should I do? Thanks [Random letters hsiukhdufhjwrepjèijgitrjwbnrtnbnbeènbèrnbgnèjwtigogjwitjgbniownttngfnwnpnwpjgnjntwjtngjnjwngjggpnwrjgrngjwpnjnvwpjeenjrvnjpreqngjnpwjgnrjpwnjpn2ngj2nrjnp2r2g2hhuheqdhyg1eydgugf] updated code of MainActivity: public class MainActivity extends AppCompatActivity{

how to send verification mail in firebase and forgot password link in firebase flutter version

北城余情 提交于 2019-12-11 06:46:46
问题 how to send verification mail in firebase and forgot password link in firebase flutter version firebase_auth plugin I don't found any forgot password method is there any other way for both 回答1: Looking at current master, I don't think it is implemented yet. Perhaps file a feature request in flutter issue tracker? 回答2: fire base is providing the option to reset the password of the user this query will send a url for reseting the password to user mail id var auth = firebase.auth(); var

How to do custom Auth using Firebase?

笑着哭i 提交于 2019-12-11 06:24:33
问题 Excuse any apparent lack of knowledge... that's why I'm here... How can I create a custom Auth method in Firebase? I do not see an option for "username/password" -- only "email/password." Is the term "email" simply an arbitrary name for a string that could just as well be a "username" ? I would like to create a system whereby app users are automatically assigned a unique username (that they never see) derived from their device hardware at app install time, only having to provide a password.

Firebase Authentication redirecting to a blank page after sign in

倾然丶 夕夏残阳落幕 提交于 2019-12-11 06:19:40
问题 Apps script sidebar redirects to a blank page after authenticating with Firebase Auth. My Firebase Auth Implementation redirects to a blank page on apps script sidebar. I implemented the code below from the official guide <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Sample Firebase Auth App</title> <script src="https://www.gstatic.com/firebasejs/5.9.2/firebase.js"></script> <script> // Initialize Firebase var config = { apiKey: "", authDomain: "<project-id>.firebaseapp.com",

Managing team permissions and allowing two users form the same team to access a node

為{幸葍}努か 提交于 2019-12-11 06:15:05
问题 I allow login with Google to my Firebase web app. I control access to the database by the auth.uid: { "rules": { "users": { "$uid": { ".read": "auth.uid === $uid", ".write":"auth.uid !== null", "images": { ".read": "auth.uid === $uid", ".write":"auth.uid === $uid", }, ... I want to enable other users in the user's team to access his/her images. I went over the docs but couldn't find a way to accomplish that. Any ideas? 回答1: Security rules are able to read data from other keys, so it's