I've a project using Firebase, and I need to add an owner to the project.
This is how I added him:
Opened the project in the Firebase console.
Clicked on the settings wheel next to the project name, and selected permissions.
Firebase launches a new page "IAM & Admin".
Pressed on Add, which shows a popup.
Entered the user gmail address, which auto completes so it could never be a wrong email.
Selected the role as OWNER.
Pressed on ADD button.
Now it shows me the user in the permissions list, with the message:
Invitation sent. Pending acceptance.
I've seen this answer, which says :
The newly added users may sometimes not be getting an email invite. So be certain to let them know that you added them.
I've let the user share his screen with me on Skype, and this is what happens:
The user do get an email invitation, when he presses on accept invitation, the firebase console page is opened with the project name in the url !
But it doesn't show the project which I've shared. it just loads the Firbease console showing different projects that he owns from before !
And I still see this message:
Invitation sent. Pending acceptance.
As #Frank has mentioned this is probably a bug that should be fixed in the firebase console.
I've managed to do a workaround by not using Firebase permissions, but by using Google Cloud service instead.
In Google Cloud Services console I do have access to the same projects in Firebase console, so I opened the project, from the menu selected IAM & ADMIN which looks exactly the same as the IAM & ADMIN in firebase console, I've added the collaborator as an owner exactly as I've mentioned in the details above, and what do you know ! an email invitation was sent, the user accepted the request successfully.
And when he opened his Firebase console again, the project is now available in his projects list.
firebaser here
This is a known issue in the workflow for adding Owners that was introduced recently. It should be fixed soon, but in the meantime you can work around it by first adding the user as an Editor (no invite/accept workflow required), and THEN adding the user as an Owner (accept invitation workflow should be properly displayed).
Tried the GCP approach with same result - nothing! BUT, after an hour the profect appeared in my member's Firebase and GCP dashboards.
Related
A project that we are building uses the Google cloud identity toolkit multi-tenant feature. We have two tenants that we are actively using. We interact with all of this through Firebase's authentication suite.
I've noticed that when using this the user accounts do not show up in Firestore's UI anymore. The same goes for the local emulator.
I know the user has been created because when I log in I get back the correct uid matching the user profile created in firestore that I can see in the local emulator.
I'd like to know if anyone can help me with one of the following:
Is there a way to manage the users created for a multi-tenant setup through the emulator?
Is there a way for me to use gcloud cli locally to manage the users that I have created locally?
Good news! The updated version of the emulator will show you tenants. Once you run the emulator, attempt to login as a user through a tenant, and your "auth" page will magically get a "Tenant" dropdown.
Bad news! The non-default-tenant users don't seem to persist by any export method I have discovered so far.
As for seeing those users in the firebase console, it's pretty easy, but an extra step. Under "authentication" in the firebase console, you should see a tenant dropdown.
If you open that, there will be a link "Other tenants can be managed in the Google Cloud Console". Click it, then click "users" on the left. Finally choose your tenant in the "Tenant" dropdown.
I've updated the firebase library recently and didn't change anything else.
implementation 'com.google.firebase:firebase-auth:20.0.1'
implementation 'com.google.firebase:firebase-messaging:21.0.0'
implementation 'com.google.firebase:firebase-storage:19.2.0'
implementation 'com.google.android.gms:play-services-auth:19.0.0'
but whenever a user tries to signup, a Recaptcha is showing for a few seconds and then sometimes redirects to a web browser (CustomChromeTab) after that OTP is received from firebase auth. It takes about 15-30 seconds. How to prevent the Recaptcha? However, I added the SHA1 and SHA256 in the firebase console and have not changed the code. Thanks.
Here is the screenshot of the captcha verification process:
Most of the times while implementing dependencies like:
implementation 'androidx.browser:browser:1.2.0'
the above window pops-up in the browser.
Here, is a way to resolve it successfully.
Step 1-
In the Google Cloud Console, enable the Android DeviceCheck API for your project. The default Firebase API Key will be used, and needs to be allowed to access the DeviceCheck API.
Step 2-
If you haven't yet specified your app's SHA-256 fingerprint, do so from the Settings Page of the Firebase console. Refer to Authenticating Your Client for details on how to get your app's SHA-256 fingerprint.
Hope it works!!!
For more information, you can also check Google SafetyNet API for checking Google Play Services installation in device at the time of Phone Authentication.
Also, need to perform additional steps:
Firebase Project Settings > App check > and Register firebase project in SafetyNet and Play Integrity register with default time token 1 hour.
Don't forget to go in Firebase Project Settings > App check > and Register firebase project in SafetyNet and Play Integrity register with default time token 1 hour and u will remove reCaptcha from phone auth OTP!
Try this alternative method to disable reCaptcha
mAuth = FirebaseAuth.getInstance();
// set this to remove reCaptcha web
mAuth.getFirebaseAuthSettings().setAppVerificationDisabledForTesting(true);
because I've been following Mohd Asim answer, and it doesn't work.
In order to remove the captcha verification, you have to do this in Google cloud console.
IMPORTANT (you may have done that, but for the reminder):
Add the SHA1 and SHA256 of your project (see how to get) in the firebase project setting page (See how to set).
Go to the Library page in the Google APIs Console.
In the search bar type "Android Device Verification", and select the Android Device Verification box (API). The Android Device Verification API dashboard screen appears.
If the API isn't already enabled, click Enable. Hope here your problem solves and if not then proceed further.
If the Create credentials button appears, click on it to generate an API key. Otherwise, click the All API credentials drop-down list, then select the API key that's associated with your project that has enabled the Android Device Verification API.
In the sidebar on the left, click Credentials. Copy the API key that appears.
Use this API key when you call the attest() method of the SafetyNetClient class.
For more information read this official page - https://developer.android.com/training/safetynet/attestation
go to google cloud console
Select project it should be same project in which firebase is running and make sure you have added sha-1 and sha-256 of both debug and release version and put updated google-services.json file in your app.
search android device verification
click on enable
5.done
I have migrated from fabric to firebase by connecting apps via console but I am not getting crash report emails from firebase. I added different users from "Users and Permissions" as suggested here. But I am still not getting email notifications on crash. I tried creating custom role from google cloud console but I am not able to see that in my firebase console. Only case where I am getting mails is when I am adding new user as "Owner" which I think is not right because it would mean I should give full access to all team members. Has anyone faced such issue before?
P.S.: Crashes are logged in console but I am not getting email notifications on crash.
You can configure your email preferences from Alert Settings under the alert icon on the top left of the console. What does this window look like in your firebase console?
Next you need to have at least view permissions on the project to receive e-mail notification. Project owners and editors get email alerts by default. More information on this can be found here.
I'm creating a flutter app and use Firebase Auth, everything works just fine including Facebook and Google sign ins, however, once password reset link is sent via email, it shows up as already expired.
I have found this answer which states "you need to include the app itself which is where the emails originate: .firebaseapp.com", I don't understand what type of credential needs to be added. Could someone look at the images below and advice what is missing? Or is this not the problem in my case? What else should I check?
Credentials:
Firebase console:
Webpage:
In case anyone runs into an issue like this, here's what solved my issue (thank you, Firebase support!!!).
Go to Cloud Console, under APIs & Services > Credentials
Select API key that has "Restrictions" as "HTTP referers" (See question picture "Credentials").
Under "Application restrictions", add https://Project_ID.firebaseapp.com (hence you need to copy your Project ID from the firebase console (See question picture "Firebase console")
In my case I had AWS cognito credentials there and since I've moved to Firebase it was not updated.
Firebase Crashlytics has a feature for customizing crash reports. In my case, I'm reporting the internal user ID so that I can pull up more information to debug the issue.
I'm not able to see the user ID anywhere in the Firebase Crashlytics tab.
I call this in
Application.onCreate()
Crashlytics.setUserIdentifier(uid);
You can see it here:
Or try to search reports by user ID here:
If the search result is empty, it means your "test crash" hasn't synced yet.
You don't see the user ID in Firebase Crashlytics because you are not calling the correct method.
Here is how to do it:
FirebaseCrashlytics.getInstance().setUserId("12345");
In addition, you can give yourself more context for the events leading up to a crash by logging custom message:
FirebaseCrashlytics.getInstance().log("Higgs-Boson detected! Bailing out");
For more infos:
https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0&platform=android#set_user_ids
Add FirebaseCrashlytics.getInstance().setUserId(uuid);
in all screens (activities). If you add only in login screen then userid will not share to crashlytics, when app is crashed after reopening. Since we will ask user to login only once.