firebase-authentication

onAuthStateChanged doesn't get called when email is verified in flutter

纵饮孤独 提交于 2019-12-11 18:49:07
问题 When a user signs up in my app he gets a verification e-mail. The onAuthStateChanged -listener gets called when a user gets created using createUserWithEmailAndPassword but not after the email got verified. I have a separate class which handles all authentications. The following method is to sign up user Future<FirebaseUser> signUpUser(email, password) async { final FirebaseUser user = await _auth.createUserWithEmailAndPassword(email: email, password: password); assert (user != null); assert

Firebase: Email verification and user login to be able to access the page

喜欢而已 提交于 2019-12-11 17:58:05
问题 I have created a form "main.html#!/register" to allow users to enter their: firstname, lastname, email and login. Once all those entered an email verification is sent, so that they cannot get to the page "main.html#!/success" before verifying the email. The good news is : If they try to get to the access page from the login page without confirming the Email, they will not be able to access. The bad news is : Right after the registration, if they enter the "main.html#!/success" they will be

polymerfire logs out current user when a new user is registered

二次信任 提交于 2019-12-11 17:55:29
问题 I have an admin section in my Polymer 1.0 app that gives admin users the ability to create other new users. However, as soon as the new user is registered the admin user is logged out and the new user is logged in. I'm using the polymerfire elements <firebase-app> and <firebase-auth> to do this, is there a way to keep the admin user logged in while still registering a new user? 回答1: I read this answer to a similar non-polymer question which led me to a simple solution. Just add a second

How to log in two different types of users to different activities automatically without having to log in again?

眉间皱痕 提交于 2019-12-11 17:52:28
问题 There's this android application I'm building with Firebase as the backend. It requires two different sets of users, a set of lecturers and a set of students. There's an issue however. I would want a student that has already logged in and closed the app to automatically log in to a different home activity when the student opens the app again. Same should apply to the lecturers. How do I achieve that? Can someone help with a sample code? I know about the functionality that firebase uses to

SHA-1 problem with Firebase and Google-Auth and Phone-Auth

血红的双手。 提交于 2019-12-11 17:52:03
问题 I'm currently making an app where you can also login via your Google account or mobile phone number with Firebase. With the keytool I have already read my SHA-1 and stored it in the project settings of Firebase (I also read the SHA-1 value via Gradle in Android-Studio, of course it's the same value as in Keytool.). When I test the app while debugging, everything works fine. As soon as I make a release of the APK (signed APK V1 & V2) and install this APK, logging in via Google or mobile phone

application crashes during the first launch while using FirebaseAuthentication

隐身守侯 提交于 2019-12-11 17:36:00
问题 I've been starting to learn android since past few months. I'm creating a very basic chat application that uses Firebase Authentication, Firebase realtime database and Firebase Storage. I have used Lapit Chat Application YouTube tutorial and its source code in GitHub as the reference. My application has MainActivity as the launcher activity, where the Firebase Authentication checks whether authentication is successful or not. If not, user is navigated to StartActivity (where user can login or

Phone authentication always producing negative responses in firebase

孤者浪人 提交于 2019-12-11 17:35:39
问题 private void verifyphone(final String phone) { final String ph=phone; pDialog=new Dialog(this); pDialog.setContentView(R.layout.phoneverification); pDialog.setCancelable(true); pcode=pDialog.findViewById(R.id.pcodebtn); vcode=pDialog.findViewById(R.id.vcode); pstatus=pDialog.findViewById(R.id.pstatus); pDialog.show(); PhoneAuthProvider.getInstance().verifyPhoneNumber(phone, 30, TimeUnit.SECONDS, this, new PhoneAuthProvider.OnVerificationStateChangedCallbacks() { @Override public void

Firebase: Why am I getting Firebase ID Tokens twice?

扶醉桌前 提交于 2019-12-11 17:25:45
问题 Question From the following situations, I could see two different tokens: After completing the sign-up, I get the first Firebase ID Token. I'm getting a new JWT when I come back to my app after completely signing out. What I've found const app = express(); app.use((req, res, next) => { if (!req.headers.authorization) return res.status(403).json({ message: 'Missing Authorization Header' }); const jwt = req.headers.authorization.trim(); return admin.auth().verifyIdToken(jwt).then((decodedToken)

Login the user with phone number

拈花ヽ惹草 提交于 2019-12-11 17:24:58
问题 I am working on a Messaging App. In my App one can register with one's phone number. Everything works perfectly good. All this I do with Firebase. Here is the official documentation, where I learned it. But now I have a problem. Every time the Activity starts, it should automatically login, right? How can I do this? And a little bit different Question. When the User logs out with: FirebaseAuth.getInstance().signOut(); , how can he login? Because he only created a Account with phonenumber,

Firebase Database Query Not Working

不想你离开。 提交于 2019-12-11 16:57:20
问题 I am trying to create a Firebase Login and Register App. I have setup that At the time of registration android id will save to the database. If the Android Id exits with another account the user can't create account . when i run the app and try to register an account its shows "Registering Please Wait..." and nothings happens . How can i fix this? 回答1: To solve this problem and all your problems regarding authentication is suggest you using Firebase Authentication. It's very easy to implement