Add Google-login to a Flutter app using Firebase Authentication [ 5 minute tutorial]

preview_player
Показать описание
Learn how to add Google-login to a Flutter app in less than 5 minutes. A fast tutorial with to-the-point instructions.

Important links:
A longer version of the video will be available here - [Will be available by tomorrow].

Copy-Paste items:
2.Add firebase_auth package: flutter pub add firebase_auth
3.Add google_sign_in package: flutter pub add google_sign_in

Prerequisites:
Рекомендации по теме
Комментарии
Автор

4:30 I was missing this step.. thanks for highlighting it.

hamzasiddiqui
Автор

It really helped sir kindly request to you to make more tutorials on firebase plz

sulemanali
Автор

thank you. I do successfully. But you forgot to replace the google-services.json file

thc
Автор

thank you for this tutorial. it help me.

shuamilabs
Автор

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?

roomian
Автор

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.

lufthazka
Автор

hi bro, how to remove Black Status Bar Slide to Bottom after tapping the GoogleLoginButton?

liewpeimun
Автор

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?

SayedTahsin
Автор

I'm facing this error how I can solve it, kindly reply:
throw PlatformException(code: errorCode, message: errorMessage as String?, details: errorDetails, stacktrace: errorStacktrace);

nomanabdulmalik
Автор

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.

JBtronic
Автор

I get this error when i press sign in button, any help?

Unhandled Exception: PlatformException(sign_in_failed, 10:, null, null)

ciurdea
Автор

Sorry mster but no thing display when I click on the button of login

jonyifamily
Автор

Is it same for mac? does not anything else?

learnwithshadyar
Автор

I LOVE YOU SO MUCH (you salve my @ss), you don't know how much appreciate that

maicolr
Автор

Exception has occurred. PlatformException (PlatformException(sign_in_failed, 12500:, null, null)) how solve it plz

oumaimasouid
Автор

keytool error: java.lang.Exception: Keystore file does not exist:
java.lang.Exception: Keystore file does not exist:
at
at
at

GumBoomm
Автор

i try your methode but result ?? plz help me

C:\>keytool -list -v -alias androiddebugkey -keystore
'keytool' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

soufianch
Автор

Hi Iam gettting this error Google sign-in failed: 10:

abhishekbhujel