Fingerprint was not saving in firebese - firebase

Whenever I am trying to paste SHA-1 on fingerprint section on firebase, and clicking on save button it doesn't saves it. How can I add fingerprint or SHA-1.

Related

Huawei Map Kit - Certificates

Summary of our problem:
We released last week our app bundle in the Huawei AppGallery.
We used the Huawei Map Kit in order to integrate Maps. However, there seems to be a problem with map kit.
We receive the error messages:
V/HmsMapKit_MapDataVersionClient_15: build request with apiKey
D/HmsMapKit_AuthenticateClient_86: response code : 401
E/HmsMapKit_TileCache_38: startUrlRequest Identity fail, do not has permission get tile. authResult :010002
What we have done so far:
Enable mapkit in AppGallery connect
Add sha256 fingerprints of the signed bundle to the app in AppGallery conncet
Build the app with agconnect-services.json
Initializing mapkit with the api key setup on the huawei developer page
Encode the API key as below: URLEncoder.encode("", "utf-8")
Tested the rc before uploading where it worked perfectly fine
As we are having troubles in identifying the cause for our problem, it would be very helpful to get further advice.
Thank you very much in advance.
Seems to be you are.using signing by AppGallery.
If so, you have to add one more SHA-256 to project settings, which you can get from application singing settings in console
According to this Docs,It's most likely caused by the following:
When localy building apk works but store submitted apk does not work, it is most likely the signing issue.
And for App bundle signing, there are 2 ways.
AppGallery Connect generates a new signature key for your new app
App Signing allows you to upload your own signature key
NOTE
Once a signature key is generated in AppGallery Connect or uploaded by you, it cannot be modified.
so depends on the approach, you might already have a signature key that is fixed already.
and it seems in this case you have your own signature key.
when we need to use upload key to sign apk before submit to AppGallery, do not use signature key to sign for upload apk, in this case, also upload key certificate and upload key to AppGallery.
need to make sure signature key certificate and upload key certificate are correct if used.

How to disable reCaptcha in firebase phone-auth (OTP) android?

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

Firebase Storage - Not using Tokens

I need to store profile images, and in order to fetch the right profile image I'm using the userid as the filename. However, each upload I want to save it as the same filename.
I've followed the answer on https://stackoverflow.com/a/61129057/1012500 and I'm able to access the file publicly without signing in. However, my uploads still contain a access token.
I'm uploading it using flutter. Is there anything else I need to do so that I don't use the token to get the latest version of the file ?

How to get a consistent sha1 across all app instances with flutter and firebase

Im writing a flutter mobile app that requires the use of firebases authentication product which in turn requires the use of sha1. I am on a small team and to get each instance of the app to work on each persons computer we needed to register a new sha1 address per computer, this is fine for debugging purposes but obviously cant be done in production. How do you get a consistent sha1 across all the app instances so that each new user does not have to register a unique sha1?
When you generate release APK, you will be creating a key in Keystore (a private file), from which you would extract out your release SHA1 key. This would be the consistent SHA1 key for all the users downloading the app.
You just need to add this release SHA1 key in your Firebase console.
Kindly refer here for more details about building an android application in flutter: Build and release an Android app
Happy Coding :-)
On production, you will get a signing key from Google Play and you will add that to firebase and it will generate a new google-services.json file for you. you will be fine on production.
If you are releasing the app to the stores then you have to generate a key store as described here then you need to add this SHA-1 finger print in the firebase console.
To view the SHA1-1 finger print of the above generated key store then execute below command
keytool -list -v -keystore {keystore_name} -alias {alias_name}
You can see the SHA-1 finger print in the terminal and add the same in firebase console

Firebase Auth Ui Google Sign In Code:10, message:10:

Firebase Auth Ui Google Sign In Code:10, message:10:
I use firebase auth-ui to sign in with google,
it toasted
Code:10, message:10:
implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
Google this days are making simple things complicated.
The problem is the third key,
1- The debug key
2- The release key
3- Google Play App signing key
You need THREE keys to figure out ONE Google SignIn.
Does facebook also need three keys?
Maybe one day google will need 30 keys.
To have a smooth sign in with Google across build variants (Debug, Release, and Store):
Go to Firebase admin console and open the project settings
Scroll down to "Your apps" section
Add 3 SHA-1 Values. (the one from your debug key, the one from your release key and the one from Google play singing tab)
For debugging and release keys, you can use the keytool to generate the SHA-1 value as in the docs.
EDIT
Tp reach the "App Signing" in the new Google Play console:
From Left side bar open Setup section
App Integrity
Then App Signing Key Certificate
For Google signing SHA-1 key, Go to Google play console, Open "Release Management" section and click on "App Signing" sidebar menu item. You will find the SHA-1 fingerprint value there under "App signing certificate"
These tips have worked for me :
1 - Verify your SHA-1 key is still corresponding between your app and firebase : you can generate this SHA key as #Yuliiia mentionned with the command line but you can also do it directly from you android studio project. Click on "Gradle" tab (on the right of the IDE) then drop-down android folder and double-click on "signingReport".
2 - Go to your firebase console, download a new version of the google-services.json file and replace the former one by it.
3 - Last trick : delete the account (e.g: testemail#gmail.com) you're trying to connect with from the firebase authentication console.
Note 1: For each solution above I suggest to uninstall the app from your emulator or mobile.
Note 2: Error code from firebase is not only code:10, it could throw code: 8, code: 16, etc.
Hope it helps !
Have you added your SHA certificate fingerprint code to your Firebase project? If no, do it. Official instruction to get SHA certificate fingerprint.
To get the release certificate fingerprint (Linux/Mac OS):
keytool -exportcert -list -v \
-alias <your-key-name> -keystore <path-to-production-keystore>
To get the debug certificate fingerprint (Linux/Mac OS):
keytool -exportcert -list -v \
-alias androiddebugkey -keystore ~/.android/debug.keystore
The keytool utility prompts you to enter a password for the keystore. The default password for the debug keystore is android. The keytool then prints the fingerprint to the terminal. For example:
Certificate fingerprint: SHA1: DA:39:A3:EE:5E:6B:4B:0D:82:59:BF:EF:09:68:90:70:AF:D5:07:01
I had the same issue, when I was using the downloaded version on google-services.json, but worked when used Tools->FireBase and connected to database and di the sync.
I also came across this issue several times. In my last case it was that I was trying to build app without using signing configurations. So to let android studio know about my signing configuration I had to edit ProjectRootFolder\app\build.gradle to add following configuration.
android {
signingConfigs {
debug {
storeFile file("your path to keystore file")
storePassword "keystorepass123"
keyAlias "youralias"
keyPassword "yourkeypass"
}
}
...
But it is not good for version control to hard code the values. Better to move variables to separate file. It is a common practice to move the values to gradle properties file. See below
Even though the official documentation very good, as there are multiple processes on the workflow to achieve the end result, to make it more understandable I created a tutorial video showing the complete process. Error code 10 and fix is at timestamp 24:43. See description to find out the timestamps of keystore generation,listing SHA1, signingconfigs setting and moving to gradle properties file. Hope this might help someone looking for the solution in future.
I had this issue and the cause was that Google was handling my Signing Key, and I was trying to add the SHA1 certificate from my upload key. Once I went to Google Play console to found the SHA1 certificate from the app signing key and uploaded that, I no longer received the error.
look sometimes, the Google server ID and the client ID provided by Oauth has make confusion , let me clear all , replace the new clientID with the old clientID in the google.json file , and don't edit anything more , and also put the server ID same , and then uninstall the app and rebuilt and then run the app ,,
Hopefully it will work ..

Resources