firebase-authentication

Unable to assign iam.serviceAccounts.signBlob permission

落花浮王杯 提交于 2021-01-21 07:10:19
问题 TLDR; I'm having trouble assigning an IAM permission to a service account. I'm building a test that involves minting custom tokens with firebase Auth. When I hit: const token = await admin.auth().createCustomToken('test', { isAdmin: true, }) the following error is thrown Permission iam.serviceAccounts.signBlob is required to perform this operation on service account projects/-/serviceAccounts/dashboard@appspot.gserviceaccount.com.; Please refer to https://firebase.google.com/docs/auth/admin

Get user's birthday/gender using Google Sign-In in Flutter

≡放荡痞女 提交于 2021-01-21 04:58:31
问题 I want to get user's birthday and gender using Firebase Auth and Google Sign-In. Unfortunately, after the login happens, I am getting only the user's email, display name, photo url and phone number. I saw that I can add scopes to the GoogleSignIn object, which I do - https://www.googleapis.com/auth/user.birthday.read, https://www.googleapis.com/auth/userinfo.profile, but still, I don't see any additional data after the login. Any idea how to get the result of this? Because when these scopes

Flutter: Firebase Authentication Create User Without Automatically Logging In

不羁的心 提交于 2021-01-20 19:59:25
问题 I have a user management feature in my flutter app that uses firebase authentication. I can register new user accounts using firebase_auth 's createUserWithEmailAndPassword() function. return await FirebaseAuth.instance. createUserWithEmailAndPassword(email: email, password: password); The problem is when the registration is successful it automatically authenticates my FirebaseAuth instance as the new user even though I am already logged in. I came across this answer: Firebase kicks out

Flutter: Firebase Authentication Create User Without Automatically Logging In

一世执手 提交于 2021-01-20 19:55:46
问题 I have a user management feature in my flutter app that uses firebase authentication. I can register new user accounts using firebase_auth 's createUserWithEmailAndPassword() function. return await FirebaseAuth.instance. createUserWithEmailAndPassword(email: email, password: password); The problem is when the registration is successful it automatically authenticates my FirebaseAuth instance as the new user even though I am already logged in. I came across this answer: Firebase kicks out

Where can I get “serviceAccountCredentials.json” for Firebase Admin?

自作多情 提交于 2021-01-20 15:46:27
问题 Here is said what I need to setup Firebase on java: FirebaseOptions options = new FirebaseOptions.Builder() .setDatabaseUrl("https://databaseName.firebaseio.com") .setServiceAccount(new FileInputStream("path/to/serviceAccountCredentials.json")) .build(); FirebaseApp.initializeApp(options); But where can I get serviceAccountCredentials.json ? UPDATED: I found that this file seems should have this fields, but where get this values? { "type": "", "project_id": "", "private_key_id": "", "private

Firebase Too Many Requests Exception

丶灬走出姿态 提交于 2021-01-20 12:20:17
问题 While working on android app with firebase I sent too much otp requests while testing my app phone authentication and they blocked otp services for my app how can I access otp services again? Here is the screenshot of Firebase exception 回答1: As the error message already says: "Try again later". This type of condition/block is typically cleared after some time, with the exact interval depending on how overly frequent your requests were. Consider testing with fictional phone numbers to prevent

Update the email verification status without reloading page

五迷三道 提交于 2021-01-13 09:13:54
问题 After registering in my web app, i redirect the user to a page, where he is told to verify his email. Once he has done that, i want to automatically detect the change of the verificationStatus and then change the page. Something along those lines. auth.user.subscribe(user => { if (!!user && user.emailVerified === true) { this.redirectToLogin(); } }); I couldn't find any way to detect changes of the emailVerified status, so I thought, maybe have an interval runnning that is updating the user

Does the firebase user uid change if the user is signed out of the app when using email authentication?

跟風遠走 提交于 2021-01-07 07:01:48
问题 I have to implement firebase email authentication and want to store data with a field of firebaseUser.uid in that. I want to know if there is any case when the user's uid will be changed so that I don't mess up with the user data as I will be referring it based on the user's uid. So if any user signs up using an email id, it's uid should never change unless he logs in again with a different email. 回答1: The UID for a user is assigned randomly and never changes within that project. 来源: https:/

How long does a Firebase Auth session last when the user is offline?

為{幸葍}努か 提交于 2021-01-07 04:12:55
问题 My App is on Flutter and I am using offline persistence because my users can stay up to 4 hours before having an Internet connection again. I have read that Refresh Tokens are long-lived and in theory "never expire", however in my tests I have noticed that there is a big difference between IOS and Android sessions: The tests I'm doing are the following: I open the App with Internet Connection and I proceed to authentication process (Firebase Auth behind the lines). I use the App and then

How long does a Firebase Auth session last when the user is offline?

ぃ、小莉子 提交于 2021-01-07 04:09:34
问题 My App is on Flutter and I am using offline persistence because my users can stay up to 4 hours before having an Internet connection again. I have read that Refresh Tokens are long-lived and in theory "never expire", however in my tests I have noticed that there is a big difference between IOS and Android sessions: The tests I'm doing are the following: I open the App with Internet Connection and I proceed to authentication process (Firebase Auth behind the lines). I use the App and then