the repository contains the full code to add phone authentication using firebase in flutter
- added the feature to automatically read and auto-fill otp please watch the another part for the tutorial
- Sent OTP to the phone number
- Verify the OTP received
- Automatically read OTP SMS and auto-fill OTP code
watch this video here.
To view sha1 / sha256 key for phone auth use this command to
First visit the user folder of the OS Like C:/YouUserName
for Windows or /usr
for Linux there you will find a folder named .android folder and there will be a file named debug.keystore
- if the file is there then it means you already have a sha1/sha256 key , no need to generate
- if not then you need to generate a new debug.keystore file
keytool -list -v -keystore debug.keystore -alias androiddebugkey
after running this command this will ask for a password the default password is android
Run this to create first then run above command only if you don't have an existing debug.keystore or you have forgotten the password of the previous one.
keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -keysize 2048 -validity 10000
make sure to run the command inside .android folder of your user folder of os.