Flutter phone sign-in fails with status 17028 and play_integrity_token
SMS verification code request failed: unknown status code: 17028 Invalid request fields in play_integrity_tokenShort answer
Firebase checks the app with Play Integrity before sending an SMS, and that check needs your SHA-256 fingerprint. Add SHA-256 for every key that signs the app, including the Play App Signing key if you use it. If the check falls back to reCAPTCHA, it needs SHA-1 and an API key that is not restricted.
Fix it fast
1Find out which cause you have
Print the fingerprints of the key that signed the build you are running, then compare them with the Android app in the Firebase console.
cd android ./gradlew signingReport2Match what you see, then jump to its fix
- 1
17028 on a debug or release build; only SHA-1 is listed in the consoleThe SHA-256 fingerprint is not registeredFix - 2
Your own fingerprints are registered, but the build you test is signed by Google PlayThe build is signed with a key you did not register (Play App Signing)Fix - 3
Play Integrity cannot verify the device, and the browser step fails or never returnsThe reCAPTCHA fallback cannot completeFix
- 1
What does the error look like?
SMS verification code request failed: unknown status code: 17028 Invalid request fields in play_integrity_token
Cause 1 of 3
The SHA-256 fingerprint is not registered
1Check
The phone auth guide says to specify the app's SHA-256 fingerprint to use Play Integrity. Compare the SHA-256 line from signingReport with the console.
./gradlew signingReport | grep -E "Variant|SHA-256"2Fix
In the Firebase console open Project settings, find your Android app and add the SHA-256 (and SHA-1) under SHA certificate fingerprints.
# Firebase console > Project settings > Your apps > Android app > SHA certificate fingerprints > Add fingerprint3Verify
Rebuild, install and request a code again.
flutter runConfirmed by firebase.google.com
Cause 2 of 3
The build is signed with a key you did not register (Play App Signing)
1Check
With Play App Signing, Google re-signs the app, and its certificate differs from the upload key you create locally. Read the app signing fingerprint in the Play Console under Release > Setup > App Integrity.
# Play Console > Release > Setup > App Integrity: read the app signing key certificate SHA-1 and SHA-2562Fix
Copy the SHA-1 and SHA-256 of the app signing key from the Play Console into the Firebase console as extra fingerprints.
# Play Console > Release > Setup > App Integrity > App signing key certificate, then add it in Firebase3Verify
Install the build from the Play testing track and sign in with a phone number.
# on the device: request the SMS code in the appConfirmed by developers.google.com
Cause 3 of 3
The reCAPTCHA fallback cannot complete
1Check
Without Play Integrity (for example, no Google Play services), Firebase uses reCAPTCHA. That flow needs a SHA-1 on the app and an API key that is unrestricted or allows PROJECT_ID.firebaseapp.com.
# Google Cloud console > APIs & Services > Credentials > your Android API key > restrictions2Fix
Add the SHA-1 fingerprint, and remove the key restriction or allow the Firebase auth domain.
# Add PROJECT_ID.firebaseapp.com to the key's allowed list, or set the key to unrestricted3Verify
Try the sign-in again on a device with Google Play services.
flutter runConfirmed by firebase.google.com
How do I stop it coming back?
- Add SHA-1 and SHA-256 for debug, release and Play App Signing keys as soon as each key exists.
- Use Firebase test phone numbers (up to 10) while developing, so no real SMS and no real numbers are used.
- Never ship a build with app verification disabled for testing.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- SessionBirdAn omnichannel engagement suite in Flutter: campaigns, chatbot, tickets, analytics and live calling.
- WorkforceA field app, an admin console and a self-hosted Node.js server for push and reconciliation.
- Spotless LaundryAn on-demand laundry app: Flutter on a Laravel back end, with Firebase for live updates.
Related fixes
Mobile apps
Google Sign-In in Flutter fails with PlatformException sign_in_failed, code 10
GoogleSignInExceptionCode.clientConfigurationError
Code 10 means Google could not match your app to an OAuth client.
3 causes, each with a fixMobile apps
Gradle cannot find com.google.firebase:firebase-analytics-ktx
Required by: project :app
Firebase moved the Kotlin extensions into the main modules and stopped releasing the -ktx modules in July 2025.
2 causes, each with a fixMobile apps
Flutter Android: Failed to load FirebaseOptions from resource
Failed to load FirebaseOptions from resource. Check that you have defined values.xml correctly.
On Android, Firebase reads its settings from a values.xml file that the Google services Gradle plugin builds from google-services.json.
4 causes, each with a fixMobile apps
Flutter on Android: Missing google_app_id and Firebase Analytics disabled
Missing google_app_id. Firebase Analytics disabled.
The Firebase Android SDK reads your app ID from values the Google services Gradle plugin generates from google-services.json.
3 causes, each with a fixMobile apps
Google Play says the app does not support 16 KB memory pages
check_elf_alignment.sh reports UNALIGNED for a library under lib/arm64-v8a
Google Play requires apps that target Android 15 or higher and ship native .so libraries to run on devices with 16 KB memory pages; from 1 February 2027 it will block updates that do not.
5 causes, each with a fixMobile apps
FirebaseInstanceIdService and FirebaseInstanceId.getToken() no longer work
Deprecation warning on FirebaseInstanceId.getInstance().getToken()
Move token handling into a class that extends FirebaseMessagingService and override onNewToken, which runs when a token is first created and whenever it changes.
2 causes, each with a fix