I am using NativeScript (Vue app) with the Firebase plugin to allow Google account logins. The login button redirects to Google sign-in page but I cannot sign in. The error displayed is "This account already exists on your phone."
According to the plugin page this will happen if the SHA1 fingerprints have not been uploaded to the Firebase console.
There is no difference between a physical device or the emulator, neither between "tns run" and "tns build" and then uploading the APK manually.
The command I use is
tns run android --key-store-path ./keyStore.jks --key-store-password <my_keystore_password> --key-store-alias <my_alias> --key-store-alias-password <my_alias_password> --bundle
I followed these steps:
- Used keytool to get the SHA1 and added it to the Firebase console.
- Downloaded the google-services.json file and added it to the app/App_Resources/Android folder.
- Used apksigner to verify the SHA1 and it matches what I have in the Firebase console as well as the keystore.
When I check the Firebase Analytics page I can see the connection, so I am using the correct app URI etc.
The following is printed in the terminal window:
JS: 'Make sure you\'ve uploaded your SHA1 fingerprint(s) to the Firebase console. Status: Status{statusCode=unknown status code: 12502, resolution=null}'
JS: 'Has the SHA1 fingerprint been uploaded? Sign-in status: Status{statusCode=unknown status code: 12502, resolution=null}'
I noticed another question regarding this on SO but it's not been answered and is a few years old.
Any suggestions/help would be greatly appreciated.
google-services.jsonin yourApp_Resources/Androiddirectory? - Manoj