firebase-authentication

How do you link firebase accounts in firebase_auth 0.11.1 in flutter?

喜欢而已 提交于 2020-02-22 09:39:46
问题 I've successfully implemented Google and Facebook sign ins for Flutter using firebase_auth 0.11.0. I need to implement the linking account feature for accounts that have the same email address. Future<FirebaseUser> _signInWithGoogle() async { final GoogleSignInAccount googleUser = await _googleSignIn.signIn(); final GoogleSignInAuthentication googleAuth = await googleUser.authentication; final AuthCredential credential = GoogleAuthProvider.getCredential( accessToken: googleAuth.accessToken,

Firebase: recent login requested

只愿长相守 提交于 2020-02-21 12:06:49
问题 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

Firebase: recent login requested

北慕城南 提交于 2020-02-21 12:05:33
问题 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

Firebase authentication for private server

旧巷老猫 提交于 2020-02-21 10:42:08
问题 I am developoing a flutter app and want to use Firebase auth service to enable my users to signup/login using: email/pass google facebook I have a lumen backend REST server with MySQL database. Problem: Going through loads of firebase documentation I cannot understand the whole flow of how this should work. I can successfully create users using the app and they appear in the firebase console, however, I don't know how to enable them to securely talk to my backend server. I would expect

How do I use the Firebase onAuthStateChange with the new React Hooks?

若如初见. 提交于 2020-02-21 10:18:01
问题 I am using Firebase to authenticate users for my application. I have created the SignIn and SignUp forms and can successfully create new users and sign in with stored users. However the issue comes with maintaining the user logged in state after a Reload . The way I have seen it done in tutorials is to use a HOC like the following to check if the current user is logged in. const withAuthentication = Component => { class WithAuthentication extends React.Component { constructor(props) { super

How do I use the Firebase onAuthStateChange with the new React Hooks?

烂漫一生 提交于 2020-02-21 10:13:47
问题 I am using Firebase to authenticate users for my application. I have created the SignIn and SignUp forms and can successfully create new users and sign in with stored users. However the issue comes with maintaining the user logged in state after a Reload . The way I have seen it done in tutorials is to use a HOC like the following to check if the current user is logged in. const withAuthentication = Component => { class WithAuthentication extends React.Component { constructor(props) { super

How do I keep a user logged into firebase after refresh in React.JS?

房东的猫 提交于 2020-02-20 07:31:20
问题 When mounting a component, I'd like to render either a log in screen or the app, depending on wether the user in logged in. However, each time I refresh, the user is logged out. How would I keep them logged in? App Component: firebase.initializeApp(config); //init the firebase app... class App extends Component {//this component renders when the page loads constructor(props){ super(props); this.state = {user: firebase.auth().currentUser};//current user } render(){ if (this.state.user) {//if

Firebase Auth/unauthorized domain. Domain is not authorized

半腔热情 提交于 2020-02-19 10:11:12
问题 I am trying to run this sample firebase project, but I keep getting this error in the browser console. Lf {code: "auth/unauthorized-domain", message: "This domain (mail-demo-fcm.firebaseapp.com) is not…se console -> Auth section -> Sign in method tab."} code: "auth/unauthorized-domain" message: "This domain (mail-demo-fcm.firebaseapp.com) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab." I have

How to handle FirebaseAuthUserCollisionException

徘徊边缘 提交于 2020-02-13 03:03:40
问题 I started getting a FirebaseAuthUserCollisionException exception when I try to sign in with Facebook in my Android application. com.google.firebase.auth.FirebaseAuthUserCollisionException: An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address. I am using Firebase to handle the registration and Facebook to deliver a "one-click" login method, using a com.facebook.login.widget.LoginButton view as a

Exception has occurred. PlatformException (PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null))

寵の児 提交于 2020-02-07 03:14:04
问题 I am using firebase for google authentication in my flutter app. I registered app in the firebase and set all configurations like adding SHA1 and SHA256 key, and all. However, I get the error: final FirebaseAuth _auth = FirebaseAuth.instance; final GoogleSignIn googleSignIn = new GoogleSignIn(); Future<FirebaseUser> _signIn() async{ GoogleSignInAccount googleSignInAccount = await googleSignIn.signIn(); GoogleSignInAuthentication googleSignInAuthentication = await googleSignInAccount