unknown status code: 17028 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.
hello there, i m facing this issues while developing application, i have tried to fix and these are the steps i have done so far but the same result:
in addition to that when i use testing phone number i added to the console and the otp code i insert, my app works perfectly but when trying to authenticate the phone using other un registered phone numbers it keeps showing me error.
i have cheched flutter doctor -v it has no error also execute flutter commands there is nothing error related thing on the result. I have used the following firebase plugins
firebase_auth: ^0.18.4+1 firebase_core: ^0.5.3 cloud_firestore: ^0.14.4 firebase_admob: firebase_messaging: ^7.0.3 firebase_storage: ^5.2.0
any help from you would be appreciated
The solution to this is: If you did your configuration of firebase and app project correctly then
flutter clean to clean your project dependencies.flutter pub get to get all dependencies again.Then you're good to go. It worked for me.
If all above solution tried, follow my solution. I believe your problem may be same as mine.
please check your android/app/build.gradle file.
signingConfigs {
if (System.getenv("ANDROID_KEYSTORE_PATH")) {
release {
storeFile file(System.getenv("ANDROID_KEYSTORE_PATH"))
keyAlias System.getenv("ANDROID_KEYSTORE_ALIAS")
keyPassword System.getenv("ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD")
storePassword System.getenv("ANDROID_KEYSTORE_PASSWORD")
}
} else {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
}
In my verygood cli created project signingConfigs is configured for only release build, so my own generated key is not using for build debug apk. So
From root directory of flutter project
cd android/
./gradlew signingReport
Collect your default SHA-1 and SHA-256 key and updated on firebase console.
flutter clean and run project
Don't need to update google-service.json file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With