this app is not authorized to use firebase authentication. please verify that the correct package name and SHA-1 are configured in the firebase - flutter

this app is not authorized to use firebase authentication. please verify that the correct package name and SHA-1 are configured in the firebase console
i have try so much things to solve this but nothing went happen

check the same firebase project in google cloud and cross-verify SHA-1 keys in firebase to google cloud, if see any old SHA-1 keys delete them or if your SHA-1 key from Firebase is not in google cloud then add sha-1 from add credential option. if still same error then create a new firebase project and then try again.

First, get the SHA-1 and SHA-256 keys. Run the following commands in your project root terminal window (from vscode or Android studio) one by one
cd android
./gradlew signingReport
this will take few minutes then you'll be popped up with a screen similar to this.
Copy SHA-1 and SHA-256 keys and paste it in firebase project settings at
Scroll down to find your android app then click on Add fingerprint
Note: Make sure to add both the keys, else it may not work as desired.
Happy coding :)

Related

Implementing google login flutter gives 12500 error

I implemented google login in flutter without using firebase in flutter (google cloud console). It was working in apk then later I needed push notification service for which I used firebase (fcm token and all) then I released the app to playstore but google login does not work. I keep getting apiexception error. Has anybody faced this issue? if yes any help would be highly appreciated.
I do not have a specific answer to your problem but I have also faced this problem once, I accidentally resolved it though.
But Error 12500 is a general error code that may occur when attempting to use the Google Sign-In feature and is caused by a few potensial issues:
An issue with the SHA-1 fingerprint of your app's signing
certificate: To use Google Sign-In, you need to configure your app's
SHA-1 fingerprint and package name in the Firebase console. Make
sure that the fingerprint and package name you have configured in
the Firebase console match the ones you are using to sign your app.
An issue with the Google Services configuration file: Make sure you
have properly added the Google Services configuration file to your
app.
An issue with the Google Play Services library: Make sure you have
the latest version of the Google Play Services library installed in
your app.
An issue with the device or emulator you are using: Make sure you
are testing on a device or emulator that has Google Play Services
installed and is up to date.
Possible fixes to try/check:
Double-check the SHA-1 fingerprint and package name: Make sure that
the SHA-1 fingerprint and package name you have configured in the
Firebase console match the ones you are using to sign your app.
Make sure you have added the Google Services configuration file: The
Google Services configuration file is required for your app to
communicate with Google services, including Google Sign-In. Make
sure you have properly added this file to your app.
Update the Google Play Services library: Make sure you have the
latest version of the Google Play Services library installed in your
app. You can check for updates by going to the "SDK Manager" in
Android Studio.
Test on a device or emulator with Google Play Services installed:
Make sure you are testing on a device or emulator that has Google
Play Services installed and is up to date.
I hope this helps! I will quickly search if I can find any other solution.

Appcheck verification flutter firebase android

I saw documentation for flutter firebase Appcheck
what do I need to do in release mode with an original certificate?
because all it says is for website verification
await FirebaseAppCheck.instance.activate(webRecaptchaSiteKey: 'recaptcha-v3-site-key');
I am unable to understand what to add in code for making use of app check in flutter
I think that code is only for the web platform.
For android open your main project directory in the terminal and follow the steps below.
flutter> cd .\android\
flutter\android> .\gradlew signingReport
This will print all your keys. Find the applicable one that you want. Then, copy the SHA-256 into the correct place in the firebase console.

Release version of application cannot make API Calls?

I have completed an application that works fine in development env, both on android emulator and android phone.
I created a keystore, added INTERNET_PERMISSION to my manifest and followed the guide to release pretty much perfectly.
However, when I download the release app from the play store (it is in internal testing), the login API (and presumably the other APIs) do not work and infinitely load.
What did I miss?
The IOS Application is working perfectly in Testflight.
Assuming that you are using firebase.
After deployment to playstore.
Go to Play Console → Open App → Setup (Left panel) → App Integrity
you should be able to see something like this.
add the SHA-1 and SHA-256 fingerprint to the firebase project in firebase console and it should work after that.
Open Firebase Console → Open Project → Project Settings → General, scroll to very last and add these certificates.
UPDATE:
You need to get the new google-services.json from firebase, add it to your app, make new build and re-deploy to playstore with a new version for this to work.

Ionic and Firebase v3 google auth error

I'm trying to add the Google-plus login to my app, but no matter what I do I cannot get it working on a real Android device.
So far I was able to get the idToken from this plugin
cordova-plugin-googleplus
Using Firebase's singInWithCredential(idToken) I get an error that said:
This app, identified by the domain where it is hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.
I want to point out that I follow all the steps for the installation, SHA1 key are correct and I am using signed APKs.
Using the facebook plugin, retrieving the token and signInWithCredential worked without any issue.
Thanks in advance!
it seems like you have some API key restrictions that are not met by your ionic application.
To begin with, please check you are using the API key from the "Web setup" popup, under the auth section of the Firebase console for your project. This one should work out of the box if you have not changed your configuration in the API console.
If that doesn't fix the issue, go to the credentials section of the Google API console for your Firebase project, look for the API key that you are using, and check which referrer restrictions are set there and ensure they are met by your application. Read this answer for several options that you have to set up your API key restrictions for a Cordova app.
In my Ionic2 RC1 + Firebase3.5 + AngularFire2.beta5 project I had the same problem... Google Auth with Popup worked in Browser but not in my Android .APK
Note.- I didn't use Tokens in my App
Firstly, I add 192.168.1.172 to my Firebase Console authorized domain list and <allow-navigation href="http://192.168.1.172:8100"/> to my config.xml.
After this, I found that installing Cordova InAppBrowser plugin solves my problem definitively.
I didn't need to modify my code, only plug and play, exactly like David East says in his Social login with Ionic blog.

Google Maps v2 show blank screen when export project (apk)

When I install my proyect using usb, the map works fine but when I want export my proyect (.apk) and install the app, the map doesn't work just show blank display. Any advice.
UPDATE: I have my proyect and google play services library in my dropbox and the debug.keystore in the root c:\Users\my_user.android\debug.keystore
I have tried to do this but without success: Google Maps API V2 blank map after installation on real device
You have to update your SHA key in google console project.
You just replace exported SHA with old SHA key.
Exported SHA get like.
1) Export your project with create key store at that time you get exported SHA .
That was the solution, I needed the release key. Here is how to do that. Displaying the release certificate fingerprint
After implementing maps layout activity and manifest and other required files , the app should be build with the keystore provided in android sdk itself instead of our own keystore. keystore path - C/user/{username}/.android/debug.keystore with alias as "androiddebugkey" and password as "android"