0

Env

firebase_auth: ^0.16.1
android 10
flutter: 1.17.5

Build release app

flutter build app
flutter install

App on Play Store

search for "Renthusiast"

The 'not authorized' error occurs when the app is downloaded from the Android Play Store.

If installed locally the Firebase Authentication is successful.

The correct package name and SHA-1 and packageName/SHA-256 are registered in the "Add fingerprint" on the Firebase Console settings page.

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.
[ A safety_net_token was passed, but no matching SHA-256 was registered in the Firebase console.
Please make sure that this application's packageName/SHA256 pair is registered in the Firebase Console ] 
dak
  • 339
  • 6
  • 21

1 Answers1

0

I think you have not added SHA fingerprints for your release signing key. If you have selected something like this "Let google manage and protect your app signing key (recommended)", then you should go in Play Console, and then choose your app, go to App Signing under Setup (New version of Play Console). Your fingerprint will be available below "App Signing Key Certificate", copy it, then go to Firebase Console, inside your project, go in project settings, and then finally add your copied fingerprint. then download latest Google-services.json file and add it to your project. If you have not enabled Google signing, you have to find your fingerprint from the local signed key (which you used) using keytool and then add it.

Read this: https://developers.google.com/android/guides/client-auth

https://support.google.com/firebase/answer/9137403?hl=en

Dharman
  • 30,962
  • 25
  • 85
  • 135
Anuj Kumar
  • 1,092
  • 1
  • 12
  • 26