firebase-authentication

Firebase Auth - User not logged in after Firebase sign up and redirect

℡╲_俬逩灬. 提交于 2019-12-05 13:23:18
I am creating an account for a user with firebase. After the account is created, I redirect to the home page, which checks if I am logged in. Oddly enough, I am not logged in. On Create Account Page: createAccount() { firebaseAuth().createUserWithEmailAndPassword(this.state.email, this.state.password).then((user) => { // write some data to database firebase.database().ref().child('users').child(user.uid).child('someKey').set(this.state.email).then(function() { // send email verification user.sendEmailVerification().then(function() { console.log("sent email verification"); // Go to home page

“Uncaught ReferenceError: Firebase is not defined”

China☆狼群 提交于 2019-12-05 13:07:10
I'm working with Firebase for the first time on a practice project and I'm having a very difficult time setting up the ability for users to log in to their accounts. I've successfully set up registration but so far I can't get log in and check auth state to work properly. The error I keep receiving in the console is "Uncaught ReferenceError: Firebase is not defined" I've done some research on my own but the only answers I seem to find are ones saying you need to include the script tags for Firebase, which isn't relevant here because I have included them, or outdated responses from version 2.4

How to detect if a user has signed in to my app using Firebase with Facebook, email, or Google using Swift

好久不见. 提交于 2019-12-05 11:51:22
I want to detect if a user has signed in using Facebook or email, etc... I found an answer for Android, but I am programming in Swift for iOS and I am not sure how to translate the code entirely. The android/java code is : for (UserInfo user:FirebaseAuth.getInstance().getCurrentUser().getProviderData()) { if (user.getProviderId().equals("facebook.com")) { System.out.println("User is signed in with Facebook"); } } I have tried to translate it, but I can't seem to figure out how to access the values. I keep getting a memory address instead. Here is my swift code: let authenticatedWith = FIRAuth

'com.google.android.gms.common.api.GoogleApiClient' is deprecated

和自甴很熟 提交于 2019-12-05 11:17:22
I'm using in my app Google sign-in method and I have updated today my dependencies to: implementation "com.google.firebase:firebase-core:17.1.0" implementation "com.google.firebase:firebase-auth:19.0.0" And I stared to get warnings about deprecated classes. Warning:(26, 12) 'com.google.android.gms.common.api.GoogleApiClient' is deprecated And Warning:(27, 36) 'com.google.android.gms.common.api.GoogleApiClient.Builder' is deprecated This is my code: static GoogleApiClient provideGoogleApiClient(Application app) { //deprecated return new GoogleApiClient.Builder(app) //deprecated .addApi(Auth

Firebase 3 - Additional Auth Scope Data

南楼画角 提交于 2019-12-05 10:52:51
In the Firebase 3 documentation, they say you can grab additional scope data such as this one: Optional: Specify additional OAuth 2.0 scopes that you want to request from the authentication provider. To add a scope, call addScope. For example: provider.addScope('https://www.googleapis.com/auth/plus.login'); Once authenicated, I can't find the data as part of the "user" object. Any idea how to pick that extra data ? Thank you, Firebase V3 will not return the additional requested data when additional OAuth 2.0 scopes are requested. What you need to do is retrieve the credential returned

Firebase: recent login requested

孤街醉人 提交于 2019-12-05 10:38:50
I'm dealing with Firebase authentication for web. The documentation states that Some security-sensitive actions—such as deleting an account, setting a primary email address, and changing a password—require that the user has recently signed in. If not, the request would fail with error code auth/requires-recent-login and I should manage the case by prompting the user to re-insert her credentials. Once I have done that, I could easily re-authenticate the user with the following code: firebase.auth().currentUser.reauthenticate(credential) In the API reference there's some details more. It turns

Disable account chooser FirebaseUI React

末鹿安然 提交于 2019-12-05 10:17:17
I'm struggling with something that looks like a piece of cake, but I still can't manage to find a solution. I'm implementing a firebase authentication process, with reactjs and firebaseUI web react . Everything is just fine, except the fact that when I try to login using email/password, it takes me to accountchooser , which is a behavior I don't want. I searched the docs, github issues etc... But All I found was adding the line below in the uiConfig object : credentialHelper: firebaseui.auth.CredentialHelper.NONE The problem is that react throws an error complaining about firebaseui not being

Firebase Error: W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms

*爱你&永不变心* 提交于 2019-12-05 08:57:31
This is my SignUp Acitivity. I'm trying to create a createUserWithEmailAndPassword with Firebase and add some details to the user's profile such as Full Name, Address and Phone Number. I want to add the user profile under the Unique ID in the "users" database assigned to the new User when creating the user with email and password. public void signUpButtonClicked(View view) { if (!TextUtils.isEmpty(email_text) && !TextUtils.isEmpty(pass_text)) { mAuth.createUserWithEmailAndPassword(email_text, pass_text).addOnCompleteListener(new OnCompleteListener<AuthResult>() { public void onComplete(

Google Sign-In via Firebase: GIDSignInDelegate does not conform to ViewController

隐身守侯 提交于 2019-12-05 08:44:17
I'm introducing Google Sign-In to my app and whilst both Google and Firebase documentation is thorough enough, what I have done as they suggested is not sufficient... I am still getting this error. Hopefully this will help others with finding a solution to the problem when implementing their SDK....thanks in advance for reviewing this chunky one: Here's the Firebase guide and the Google guide: So Added Google to podfile - CHECK Added line into Bridging-Header - CHECK Added GoogleService-Info.plist & bundle identifier & reversed client ID to URL schemes - CHECK App Delegate has the following,

How can I detect if the user was deleted from Firebase auth?

自作多情 提交于 2019-12-05 08:38:35
Two apps are in the same Firebase project. One app deleted a user from Firebase Auth. But another app still get user uid from somewhere, maybe cache, and access the data in Firebase database with Auth's uid too. I mean I can still get "user.uid" by let user = FIRAuth.auth().currentUser , if keeping sign-in. The apps both set FIRDatabase.database().persistenceEnabled = true . I would like to sing out or refresh cache at all apps if the user was deleted from Auth accordingly. You can achieve it by doing this inside appDelegate : //Check if user does exists func checkUserAgainstDatabase