I was facing error on cmd regarding keytool. I set it by setting environment variable. After that, I was facing issue while typing keystore password. I tried 'changeit' or simple enter press but nothing works but then i found solution that was to simply write 'android' when it ask for keystore password.
How would you implement the stay logged in feature in this code? Suppose the user opened the app for the first time and they logged in using the "sign in with google plus" icon and then after selecting desired google account the user goes to the home page. The user then closes the application(doesn't log out) and upon reopening the app again the user should not face the signin or login page again. The user should go straight to the home page of the application and this should keep happening until the user presses a logout button. I implemented this code but the code started acting weird. The sign in pop up kept appearing, the stay logged in feature stopped working only after I had implemented the google auth. I haven't used your code yet as I didn't know how to implement the stay logged in feature in your code. Could you help me with this?
So I implemented your code into my app and you have already implemented the stay logged in feature( I don't understand how, I'm new to flutter, I was using instance.user before to detect if there was a current user with logged in credentials). The problem of the app acting weird is still there. The choose an account pop up appears repeatedly only after I logout of the app after signing in while the app is running. If I sign in the app for the first time. Close the app. Restart the app and then log out then the issue doesn't appear.
Hi Taimoor , thanks for reaching out. I would love to help you, but from your explanation the problem is not yet clear to me. I would better if you somehow can share the related code.
@@droidmonk4820 Thank you so much for the response sir. The issue was solved. Apparently you have to dispose of any timer functions if you want to use any of the social services like google login, facebook login etc. That was the issue. I used your code too it works really well. Thank you so much.
Whenever I am selecting my mail its not working. (showing the following error on console and getting back at the same page) error: Expecting binder but got null! Can you plz provide me a solution here?
everything went well, but why when I log out and then log in again a second time using the same account, the page doesn't move to home instead it stays on the login page. There is no error even displayName has appeared in the console.
@@droidmonk4820 forget it, turns out I forgot to remove the navigator.pushReplacement after the signout code 😂, and now it's working fine. Thank you sir
Hi, I have found that this issue has been reported. You can find some solutions the thread below. I haven't tried the solutions yet, if you try then let us all know if it worked for you . github.com/flutter/flutter/issues/48371
I get this error when i press sign in button, any help? ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null)
I'm facing this error how I can solve it, kindly reply: throw PlatformException(code: errorCode, message: errorMessage as String?, details: errorDetails, stacktrace: errorStacktrace);
@@droidmonk4820 Here is my code when I call this function on button and pressed button it shows error which was mention in 1st comment. signInWithGoogle() async { GoogleSignInAccount? googleUser = await GoogleSignIn().signIn(); GoogleSignInAuthentication? googleAuth = await googleUser?.authentication; AuthCredential credential = GoogleAuthProvider.credential( accessToken: googleAuth?.accessToken, idToken: googleAuth?.idToken, ); UserCredential userCredential = await FirebaseAuth.instance.signInWithCredential(credential); if (userCredential.user != null) { Navigator.of(context) .pushReplacement(MaterialPageRoute(builder: (context) => TodoAPP())); } }
I shall create a video for sure, but for now just try to make sure that you are adding the appropriate SHA key. The issue seems to be related to the SHA-1 key. You can find more information on : developers.google.com/android/guides/client-auth You can also get the the SHA-1 key using gradle's singing report: developers.google.com/android/guides/client-auth#using_gradles_signing_report
Take a look at the console and see if you get any information about an error, if you find then share with me. And thanks for reaching out, stay connected.
Exception has occurred. PlatformException (PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 12500: , null, null)) how solve it plz
keytool error: java.lang.Exception: Keystore file does not exist: %USERPROFILE%.android\debug.keystore java.lang.Exception: Keystore file does not exist: %USERPROFILE%.android\debug.keystore at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:923) at java.base/sun.security.tools.keytool.Main.run(Main.java:423) at java.base/sun.security.tools.keytool.Main.main(Main.java:416)
i try your methode but result ?? plz help me C:\>keytool -list -v -alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore 'keytool' n’est pas reconnu en tant que commande interne ou externe, un programme exécutable ou un fichier de commandes.
"'keytool' is not recognized as an internal command or external, an executable program or a batch file." --you are getting this as keytool is not added to the environment variable of your system. You have to add the path of the directory containing the keytool executable to your %PATH% environment variable.
@@droidmonk4820 I have done the same SHA 1 and 256 both added using keytool -list -v \ -alias androiddebugkey -keystore ~/.android/debug.keystore from mac but still same issue on ANDROID
4:30 I was missing this step.. thanks for highlighting it.
Hi Hamza, thanks for commenting. Stay connected.
It really helped sir kindly request to you to make more tutorials on firebase plz
Thanks for commenting Suleman. New videos are coming soon. Stay connected.
I was facing error on cmd regarding keytool. I set it by setting environment variable. After that, I was facing issue while typing keystore password. I tried 'changeit' or simple enter press but nothing works but then i found solution that was to simply write 'android' when it ask for keystore password.
Yah, the default keystore password for debug certificate is "android"
can you please elaborate how did u set enviroment variable
How would you implement the stay logged in feature in this code? Suppose the user opened the app for the first time and they logged in using the "sign in with google plus" icon and then after selecting desired google account the user goes to the home page. The user then closes the application(doesn't log out) and upon reopening the app again the user should not face the signin or login page again. The user should go straight to the home page of the application and this should keep happening until the user presses a logout button. I implemented this code but the code started acting weird. The sign in pop up kept appearing, the stay logged in feature stopped working only after I had implemented the google auth. I haven't used your code yet as I didn't know how to implement the stay logged in feature in your code. Could you help me with this?
So I implemented your code into my app and you have already implemented the stay logged in feature( I don't understand how, I'm new to flutter, I was using instance.user before to detect if there was a current user with logged in credentials). The problem of the app acting weird is still there. The choose an account pop up appears repeatedly only after I logout of the app after signing in while the app is running. If I sign in the app for the first time. Close the app. Restart the app and then log out then the issue doesn't appear.
please help :_)
Hi Taimoor , thanks for reaching out. I would love to help you, but from your explanation the problem is not yet clear to me. I would better if you somehow can share the related code.
@@droidmonk4820 Thank you so much for the response sir. The issue was solved. Apparently you have to dispose of any timer functions if you want to use any of the social services like google login, facebook login etc. That was the issue. I used your code too it works really well. Thank you so much.
Thanks for sharing your solution Taimoor, it will help others. Stay connected.
Whenever I am selecting my mail its not working. (showing the following error on console and getting back at the same page) error: Expecting binder but got null!
Can you plz provide me a solution here?
Hi , are you still having the issue. Are you using an emulator?
everything went well, but why when I log out and then log in again a second time using the same account, the page doesn't move to home instead it stays on the login page. There is no error even displayName has appeared in the console.
Are you checking the authentication status before loading the pages?
@@droidmonk4820 forget it, turns out I forgot to remove the navigator.pushReplacement after the signout code 😂, and now it's working fine. Thank you sir
thank you. I do successfully. But you forgot to replace the google-services.json file
Thanks, I shall check.
Stay connected.
hi bro, how to remove Black Status Bar Slide to Bottom after tapping the GoogleLoginButton?
Hi, I have found that this issue has been reported. You can find some solutions the thread below. I haven't tried the solutions yet, if you try then let us all know if it worked for you .
github.com/flutter/flutter/issues/48371
I get this error when i press sign in button, any help?
ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null)
Please check once whether you have added the SHA fingerprint to the Firebase project?
I'm facing this error how I can solve it, kindly reply:
throw PlatformException(code: errorCode, message: errorMessage as String?, details: errorDetails, stacktrace: errorStacktrace);
Can you share some more information about the error?
@@droidmonk4820
Here is my code when I call this function on button and pressed button it shows error which was mention in 1st comment.
signInWithGoogle() async {
GoogleSignInAccount? googleUser = await GoogleSignIn().signIn();
GoogleSignInAuthentication? googleAuth = await googleUser?.authentication;
AuthCredential credential = GoogleAuthProvider.credential(
accessToken: googleAuth?.accessToken,
idToken: googleAuth?.idToken,
);
UserCredential userCredential =
await FirebaseAuth.instance.signInWithCredential(credential);
if (userCredential.user != null) {
Navigator.of(context)
.pushReplacement(MaterialPageRoute(builder: (context) => TodoAPP()));
}
}
@@droidmonk4820 When I try to do the code on web I get the same Issue, can you make a video on how to do auth on web and mobile in the same app?
I shall create a video for sure, but for now just try to make sure that you are adding the appropriate SHA key. The issue seems to be related to the SHA-1 key.
You can find more information on : developers.google.com/android/guides/client-auth
You can also get the the SHA-1 key using gradle's singing report:
developers.google.com/android/guides/client-auth#using_gradles_signing_report
thank you for this tutorial. it help me.
Glad it helped.
Stay Connected.
I owe it to you king 👑🐐
Wow...thanks
Stay connected
Sorry mster but no thing display when I click on the button of login
Take a look at the console and see if you get any information about an error, if you find then share with me.
And thanks for reaching out, stay connected.
@@droidmonk4820 the error is google sign in canceled I tried a lot but with out any benefits
Is it same for mac? does not anything else?
It is the same. Thanks for commenting.
And sorry for the delay in responding.
@@droidmonk4820 NP bro, thank you very much
Really helped thanks buddy
Glad it helped, STAY CONNECTED
Amazing video thanks
Thanks , stay connected.
really appreciate it thanks a lot
Glad it helped, stay connected.
Nice video brother make more
Trying to make more bro. Stay connected.
Thanks for commenting.
Gran video, me sirvió muchísimo
me alegro de escuchar eso
Mantente conectado
Exception has occurred. PlatformException (PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 12500: , null, null)) how solve it plz
Hi thanks for reaching out.
Have you added a support email in your firebase project settings?
hi, could you help me?
What kind of help do you need?
thank you so much
Glad you liked it, stay connected.
Thank you
Welcome.
Stay connected.
well done bro
Thank you , Stay connected.
Awsome ❤❤
Thanks 😊
Stay connected.
Getting error by the key code
Hi, thanks for reaching out. Would you share some more information about the error .
I LOVE YOU SO MUCH (you salve my @ss), you don't know how much appreciate that
Keep working your @ss off buddy. Stay connected.
bro i get error
Can you share the exact error that you are getting?
Arey bapu! Okhomiya neki?
হয় বন্ধু, ভাল লাগিল লগ পাই 🤗, Stay connected.
Thank uyo
Welcome, Stay connected.
keytool error: java.lang.Exception: Keystore file does not exist: %USERPROFILE%.android\debug.keystore
java.lang.Exception: Keystore file does not exist: %USERPROFILE%.android\debug.keystore
at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:923)
at java.base/sun.security.tools.keytool.Main.run(Main.java:423)
at java.base/sun.security.tools.keytool.Main.main(Main.java:416)
Which operating system are you using?
And thanks for reaching out GUM.
i am facing the same problem and i am using windows
@@droidmonk4820
i try your methode but result ?? plz help me
C:\>keytool -list -v -alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore
'keytool' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
"'keytool' is not recognized as an internal command
or external, an executable program or a batch file."
--you are getting this as keytool is not added to the environment variable of your system.
You have to add the path of the directory containing the keytool executable to your %PATH% environment variable.
@@droidmonk4820 thanks for replay but i don't exist any solutions
@@soufianch8481 check the solution in the link below
stackoverflow.com/a/6211931
Hi Iam gettting this error Google sign-in failed: com.google.android.gms.common.api.ApiException: 10:
This happens when you add a wrong SHA1 key, you have to get the SHA1 for your system.
@@droidmonk4820 i generated new sha1 and added but still getting same error
@@abhishekbhujel4158 verify whether you have create the SHA1 for the correct build debug/release
@@droidmonk4820 hi I solved the problem and used your code for a successful google sign in.
@@droidmonk4820 I have done the same SHA 1 and 256 both added using keytool -list -v \
-alias androiddebugkey -keystore ~/.android/debug.keystore from mac but still same issue on ANDROID