Again a life saver! Thanks Simon! Adding an OAuth android key in the GCloud console with SHA-1 key is the key (no pun intended). Without it, you only get the vague error 10 something went wrong message.
Simon, you rock. The Android integration was driving me crazy and in the end it was because I was using the android client id on android instead of the web client id...thanks!
Thanks Simon. I've been implementing Google Auth for a Quasar app (Capacitor for iOS & Android, Electron for Mac & Windows) and this video has helped massively for the Capacitor part 👍
HUAHUAH At this very moment I was implementing an app according to your previous video about Google Signin with capacitor. And you present us with an updated version?!
Man i finally got it to work! you miss one little detail and the whole process is botched, then it's just better to start over than try to fix anything! Thanks for the tutorial.
Hello simon, I really appreciate the work you are putting in to build this community 👍 But I really wish you could revise some of your videos and post on the blog. Some don't work any more and new devs like my self only end up in alot of frustration trying to follow along. Thank you
Thank you Simon for the comprehensive demo. I have been facing the following error: The Login Popup disappears with no further information once I select an account. This fails on an Android device but works well on the web. Kindly guide
Hello Simion. Thank you for the tutorial, but I am having a problem. I followed all the stepts and my ionic angular google sign in is working perfectly in the browser, but when I test it on my android phone this is what I get: 1). I click on the google sign in button 2). I get redirected to the google window where I choose my account 3). I click on my account and then the screen with the "One moment please...." with the loading appears 4). It is stuck forever in that "loading" state. Any ideea? Because I have been working on this non stop for the last 2 days and I ran completly out of ideeas. Thank you
I use the Android Google Auth method the pop should opened and fetch all Google account from my device. when i click a particular account for fetch the credentials it throw error
Thanks you for this tutorial, I was stuck in a situation where my google auth worked on web but not on my natives apps. I wasn't using the plugin. I was wondering if by using Deeplink we doesn't need to create a android and ios clients OAuth 2.0 and only use the web OAuth 2.0 client ? Or the ios and android oauth clients are mandatory in any case? Aniway, thanks for explanations, i'll try the to use this plugin in my application and see if it's easier.
Hi simon, I did follow all of the instruction from the package repo itself it works well in web but on android you can signIn but the return result data from signin keeps saying as something went wrong, do you have any idea for this?
Hi Simon! Awesome videos, have really helped me out. I'm having the same issue you briefly had around the 15:00 mark. I authenticate with Google, select my account successfully, and hit a navigateByUrl block in Angular code. This should navigate the user to my authenticated page, but it just sits there (no errors)! I saw that happened to you too but you quickly fixed it. Can you elaborate a bit more on how that was resolved? Thanks!
in ios it returns you serverAuthCode in null? The json that it returns is not displayed correctly in the video and I have this detail where it works on both platforms but on ios it returns null serverAuthCode while on android it brings the value
Hi Simon, thanks a lot for this video... it really helped me to understand the process! I am facing a problem only when sending it to PlayStore... I generated the signed APK using production fingerprint, and it runs smoothly on my device, but when generating the App bundle (.aab) using exactly same production fingerprint and sending it to PlayStore, my google login does not work anymore! :( any ideas?
I highly appreciate your efforts to make another ionic google auth video (y) . However , the refresh doesn't seem to work on android :/ whereas it does work in the web version , how do you refresh expired tokens on android ? I happen to have an error of this sort "I don't know how to refresh token on Android"
hi Simon. I have followed the tutorial in your video. but I have occurred an error "export 'registerPlugin' was not found in '@capacitor/core'. can u please help me
When I follow this, it works, but in the dev tools, I get a warning saying that I need to migrate to the new libraries, because the old libraries are soon to be deprecated. Their migration guide is so confusing to me... you don't by chance have an updated one of this that uses the new libraries do you?
Thanks for the tutorial! It was really helpful! However I have one issue on Android, I can login with Google (and get access/id token) but I can't get the refresh token even if I set grantOfflineAccess true. Do you know how to solve that issue?
Hey Simon, Any plans on releasing video tutorial to utilize "enterKeyHint" in angular forms with event binding for 'next' to move to next form field and 'go' to submit the form?
Hi Simon, I am getting error like this {error: 'idp_initialization_failed', details: 'You have created a new client application that use…i/web/guides/gis-migration) for more information.'} When Click Sign In Object: {"error":"popup_closed_by_user"} When Refresh: {"error":"You have created a new client application that uses libraries for user authentication or authorization that will soon be deprecated. New clients must use the new libraries instead; existing clients must also migrate before these libraries are deprecated.
FYI also getting when trying from incognito window in chrome. firefox does not have the 'idp...' error but does result in same "{"error": "popup_closed_by_user"} message
@@galaxies_dev The Master himself answering my comment! 🤩 hauhau But no. Not a single line. 😓 I manage to signin on browser though. Trying to access the app specific folder on Google Drive. Would you have any material on this matter? I'm on this for weeks. Still not managed to work... 😭 Thank you for the amazingly awesome material you make. REAL life saver!! o/
I am a complete beginner with Ionic but i was wondering if i can use the firebase stuff with GoogleSign in Ionic or is it not going to work ? (it works on a angular web app and i would like to keep my code)
I actually don't know - the previous Cordova plugin is not maintained anymore and I can't see anything about it.. Maybe I should give it a try.. Let me know if you make any progress on this!
The plugin does not work on Android anymore with new capacitor. web works fine without any issue. it will work on Web but will fail on Android - google login Access blocked: Authorization Error: 403, .. this app does not comply with googles secure browsers policy.
Did you figure out a fix for this yet? This is so frustrating. I guess until they fix it I'll be forced to use a regular "web" login for email/password. That works across both mobile and web. I'll be using the one that comes with Firebase UI
SOLVED: The issue was with the SHA-1, when i run from the console the keytool i was getting different sign than the one from android studio>gradle>android>app>Tasks>android>signinReport. So i put the one from android studio and now is working.
Man, I got stressed by watching the whole process even though you showed the working version. I can't imagine how much you struggled while figuring everything out...
Hi Simon, i know i am a little bit late, but can you help me with some problem. i am creating an PWA, so it 'should' work on web and also when it is saved to ios Springboard or Android. In my case i want to build it like an app, therefore it is possible, that the user closes the app and reopens three days later. Of cours i do not want to let him re-login. So i created an redirect url to my server with grant_type: 'authorization_code' and made the authorization and stored the refresh token encrypted in my redis db.. ( i did this direct to the google APIs without a google-login library) BUT when it came to testing on ios - saved to springboard - i got a huge problem with this popup for logging in and getting the id_token which was send from my server. so get a bit more concrete: do you know a way to login and get the refresh token (in best case direct to the server) or on client which sends it in a separate call to the server, without this popup, which does not really popup on an installed PWA? i want something like a modal or something that do not crash my application. have you seen something like this?
No I don't think I've seen a flow like that, I always use the traditional login and yours sounds a bit more complex I guess. Sorry that I don't have a tip for it :/
@@galaxies_dev ok thanks.. then another question. Can you make a google login video with the new Google Identity Services Platform? I can not solve it to get an refresh token.
Hey SImon thanks for all of your videos and help ! i would like to ask you a question maybe you can help me... i am getting this error on the terminal when i run it... Error: node_modules/@capacitor/core/types/definitions-internal.d.ts:16:18 - error TS2430: Interface 'CapacitorInstance' incorrectly extends interface 'CapacitorGlobal'. [ng] Types of property 'Plugins' are incompatible. [ng] Property 'GoogleAuth' is missing in type '{ [pluginName: string]: { [prop: string]: any; }; }' but required in type 'PluginRegistry'. [ng] [ng] 16 export interface CapacitorInstance extends CapacitorGlobal { [ng] ~~~~~~~~~~~~~~~~~ [ng] [ng] node_modules/@codetrix-studio/capacitor-google-auth/dist/esm/definitions.d.ts:4:9 [ng] 4 GoogleAuth: GoogleAuthPlugin; [ng] ~~~~~~~~~~ [ng] 'GoogleAuth' is declared here. [ng] i dont understand as it seems how the capacitor.config.json or ts work towards this mission... and i am trying to troubleshoot but i cant figure it out... my config.json file is this { "appId": "com.example.app", "appName": "GuestApp", "webDir": "www", "bundledWebRuntime": false, "plugins": { "GoogleAuthWeb": { "scopes": ["profile","email"], "serverClientId": "610384633692-um9036456eubk8kplvgkrrdgv27tu28h.apps.googleusercontent.com", "forceCodeForRefreshToken": true } } }
i tried everything at the GoogleAuth attribute of the plugins... i tried GoogleAuth , googleAuth, even the GoogleAuthWeb that says in the definition... i also dont understand why they change these things over a span of 2-3 months its not logical...
I assume it's just a problems of TS typings, so you can put the /// reference line above it like in their examples here: github.com/CodetrixStudio/CapacitorGoogleAuth#configure
I have this problem ERROR Error: Uncaught (in promise): Error: "GoogleAuth.init()" is not implemented on web Error: "GoogleAuth.init()" is not implemented on web
zone.js:218 Uncaught {error: 'idp_initialization_failed', details: 'You have created a new client application that use…i/web/guides/gis-migration) for more information.'} core.mjs:6485 ERROR Error: Uncaught (in promise): Object: {"error":"popup_closed_by_user"} ************Not Working******************
Again a life saver! Thanks Simon!
Adding an OAuth android key in the GCloud console with SHA-1 key is the key (no pun intended). Without it, you only get the vague error 10 something went wrong message.
Simon, you rock. The Android integration was driving me crazy and in the end it was because I was using the android client id on android instead of the web client id...thanks!
Awesome, glad I could help Nic!
Thanks Simon. I've been implementing Google Auth for a Quasar app (Capacitor for iOS & Android, Electron for Mac & Windows) and this video has helped massively for the Capacitor part 👍
Glad it helped!
I got an error : {"message":"Something went wrong","code":"10"}
any video how to fix it ?
same error. any slotion yet?
same here, any solution?
same error =(
Just ran into this error myself. Anybody managed to get around it? Maybe @galaxies_dev?
HUAHUAH
At this very moment I was implementing an app according to your previous video about Google Signin with capacitor.
And you present us with an updated version?!
Haha looks like my predictions were correct again 😎
Man i finally got it to work! you miss one little detail and the whole process is botched, then it's just better to start over than try to fix anything! Thanks for the tutorial.
Yeah it's definitely challenging :D Glad it finally works Amin!
Background music for intro part is a nice addition.
Hello simon, I really appreciate the work you are putting in to build this community 👍
But I really wish you could revise some of your videos and post on the blog. Some don't work any more and new devs like my self only end up in alot of frustration trying to follow along.
Thank you
Sure I'm trying to create updated versions - could you let me know a list of topics that you think need an updated version? Thanks!
You have no idea how helpful this was...
Super happy to help!
Simon, your videos always helps me, thanks a lot 😃
My pleasure!
I'm not used to comment video, but really you help me so much thank you so much
Happy to help!
it's missing a video about how to add Adds to our capacitor application :( ,...how ever, your videos are awesome :)
I'll try to work on something about AdMob!
Thank you Simon for the comprehensive demo.
I have been facing the following error:
The Login Popup disappears with no further information once I select an account. This fails on an Android device but works well on the web.
Kindly guide
Bro, thanks!!! 22:05 I felt the same reliefe when it worked on android I was trying to login with google for 2 days, and your video really help me!!
Thanks a lot.. may god bless you.. was trying for the entire week.. finally saved
Welcome 👍
thank you simon, it helped me to implement it in android and ios
Happy to hear Daniel!
thank so much. I didnt found anything about the web key, only you said this, you save me
Thanks a lot!!!
The part about investigating Android with chrome inspect is a great tip
Hello Simion. Thank you for the tutorial, but I am having a problem. I followed all the stepts and my ionic angular google sign in is working perfectly in the browser, but when I test it on my android phone this is what I get:
1). I click on the google sign in button
2). I get redirected to the google window where I choose my account
3). I click on my account and then the screen with the "One moment please...." with the loading appears
4). It is stuck forever in that "loading" state.
Any ideea? Because I have been working on this non stop for the last 2 days and I ran completly out of ideeas.
Thank you
I use the Android Google Auth method the pop should opened and fetch all Google account from my device. when i click a particular account for fetch the credentials it throw error
Thanks you for this tutorial,
I was stuck in a situation where my google auth worked on web but not on my natives apps.
I wasn't using the plugin.
I was wondering if by using Deeplink we doesn't need to create a android and ios clients OAuth 2.0 and only use the web OAuth 2.0 client ? Or the ios and android oauth clients are mandatory in any case?
Aniway, thanks for explanations, i'll try the to use this plugin in my application and see if it's easier.
Nice video! Thanks!
Thanks a lot Simon GOD bless you Sir ,
Thank you mate 🙌
Hi simon, I did follow all of the instruction from the package repo itself it works well in web but on android you can signIn but the return result data from signin keeps saying as something went wrong, do you have any idea for this?
In capacitor.config.ts add "APP" serverClientID, but in index.html and string.xml you must add "WEB" clientID not "APP"
@@msosnowski8 also done your method but no luck, pulling all my hair now 😅
@@suebphatt were you able to resolve that issue?
Wery helpful, thank you!
You're welcome!
Hi Simon! Awesome videos, have really helped me out.
I'm having the same issue you briefly had around the 15:00 mark. I authenticate with Google, select my account successfully, and hit a navigateByUrl block in Angular code. This should navigate the user to my authenticated page, but it just sits there (no errors)! I saw that happened to you too but you quickly fixed it.
Can you elaborate a bit more on how that was resolved? Thanks!
in ios it returns you serverAuthCode in null? The json that it returns is not displayed correctly in the video and I have this detail where it works on both platforms but on ios it returns null serverAuthCode while on android it brings the value
Hi Simon, thanks a lot for this video... it really helped me to understand the process!
I am facing a problem only when sending it to PlayStore... I generated the signed APK using production fingerprint, and it runs smoothly on my device, but when generating the App bundle (.aab) using exactly same production fingerprint and sending it to PlayStore, my google login does not work anymore! :(
any ideas?
This code is not working with IONIC 7, can you plz check it
I highly appreciate your efforts to make another ionic google auth video (y) . However , the refresh doesn't seem to work on android :/ whereas it does work in the web version , how do you refresh expired tokens on android ? I happen to have an error of this sort "I don't know how to refresh token on Android"
Did you get any solution? Same error here
Great man!
Thanks Simon!
How do I open this login to access the logged in user's Google Calendar events?
hi Simon. I have followed the tutorial in your video. but I have occurred an error "export 'registerPlugin' was not found in '@capacitor/core'. can u please help me
Hi Simon , can you help me setting up google sign with ionic cordova app ?
Hello, I have the same code but I get popup blocked by browser
When I follow this, it works, but in the dev tools, I get a warning saying that I need to migrate to the new libraries, because the old libraries are soon to be deprecated. Their migration guide is so confusing to me... you don't by chance have an updated one of this that uses the new libraries do you?
Works so beautiful in the browser but when running the android native app just doesn't work..
Thanks for the tutorial! It was really helpful!
However I have one issue on Android, I can login with Google (and get access/id token) but I can't get the refresh token even if I set grantOfflineAccess true. Do you know how to solve that issue?
Hey Simon,
Any plans on releasing video tutorial to utilize "enterKeyHint" in angular forms with event binding for 'next' to move to next form field and 'go' to submit the form?
Yeah I might look into that!
Hi Simon, im interested in your built with ionic book, do you support parity purchasing power pricing?
Apparently there is no option available for this on the platform I'm using to sell it :(
Thank u so much
Thank You
Welcome!
Hi Simon,
I am getting error like this {error: 'idp_initialization_failed', details: 'You have created a new client application that use…i/web/guides/gis-migration) for more information.'}
When Click Sign In Object: {"error":"popup_closed_by_user"}
When Refresh: {"error":"You have created a new client application that uses libraries for user authentication or authorization that will soon be deprecated. New clients must use the new libraries instead; existing clients must also migrate before these libraries are deprecated.
I'm getting the same issue even after clearing cache :(
Me too, it seems like this way to do it is being deprecated :/
Gonna take a look at it!
FYI also getting when trying from incognito window in chrome. firefox does not have the 'idp...' error but does result in same "{"error": "popup_closed_by_user"} message
me also same issue. Please help Me!!
Keep getting an error on Android:
"Something went wrong"
Incredibly useful
[insert meme 'you don't say'] Google?!
Is there some specific error code? Because yeah that message won't help :D
@@galaxies_dev
The Master himself answering my comment! 🤩
hauhau
But no. Not a single line. 😓
I manage to signin on browser though. Trying to access the app specific folder on Google Drive.
Would you have any material on this matter? I'm on this for weeks. Still not managed to work... 😭
Thank you for the amazingly awesome material you make. REAL life saver!! o/
Same problem "Something went wrong"
SOLVED! in capacitor.config.ts add "APP" serverClientID, but in index.html and string.xml you must add "WEB" clientID not "APP"
Any Chance to avoid the first alert window asking to confirm before the Google signin is opened?
I don't think so, isn't this the default from google?
I am a complete beginner with Ionic but i was wondering if i can use the firebase stuff with GoogleSign in Ionic or is it not going to work ? (it works on a angular web app and i would like to keep my code)
Yes you should be fine to use it :)
Any solution for error code 12500?
Does Capacitor offer google one touch authentication using Identity services for react apps on loading?
I haven't checked that one before.
Hey Simon, do we have any solution for linkedin sign in with capacitor for ionic app?
I actually don't know - the previous Cordova plugin is not maintained anymore and I can't see anything about it.. Maybe I should give it a try.. Let me know if you make any progress on this!
Thank you.
Thank you so much!
Good vídeo.
Thanks!
The plugin does not work on Android anymore with new capacitor. web works fine without any issue. it will work on Web but will fail on Android -
google login Access blocked: Authorization Error: 403, .. this app does not comply with googles secure browsers policy.
Did you figure out a fix for this yet?
This is so frustrating. I guess until they fix it I'll be forced to use a regular "web" login for email/password. That works across both mobile and web. I'll be using the one that comes with Firebase UI
Great!
I am getting message: 'Something went wrong', code: '10' I follow all the tutorial, but i cant access on android, WEB & IOS works HELP!
SOLVED: The issue was with the SHA-1, when i run from the console the keytool i was getting different sign than the one from android studio>gradle>android>app>Tasks>android>signinReport.
So i put the one from android studio and now is working.
Man, I got stressed by watching the whole process even though you showed the working version. I can't imagine how much you struggled while figuring everything out...
Haha yeah these things are really PITA, especially if they don't work in the end and you need to find the issue in one of the 10 steps..
Hi Simon, i know i am a little bit late, but can you help me with some problem. i am creating an PWA, so it 'should' work on web and also when it is saved to ios Springboard or Android. In my case i want to build it like an app, therefore it is possible, that the user closes the app and reopens three days later. Of cours i do not want to let him re-login. So i created an redirect url to my server with grant_type: 'authorization_code' and made the authorization and stored the refresh token encrypted in my redis db.. ( i did this direct to the google APIs without a google-login library) BUT when it came to testing on ios - saved to springboard - i got a huge problem with this popup for logging in and getting the id_token which was send from my server.
so get a bit more concrete: do you know a way to login and get the refresh token (in best case direct to the server) or on client which sends it in a separate call to the server, without this popup, which does not really popup on an installed PWA? i want something like a modal or something that do not crash my application. have you seen something like this?
No I don't think I've seen a flow like that, I always use the traditional login and yours sounds a bit more complex I guess. Sorry that I don't have a tip for it :/
@@galaxies_dev ok thanks.. then another question. Can you make a google login video with the new Google Identity Services Platform? I can not solve it to get an refresh token.
How to integrate this with firebase authentication?
Ok i have it.. signInWithCredential()
Am I the only one who's gets a runtime error on the 'R' class ?
Have you tried using @capacitor-firebase/authentication with Angular?
No Marc don't think so, but guess that might work even better!
Hey SImon thanks for all of your videos and help ! i would like to ask you a question maybe you can help me...
i am getting this error on the terminal when i run it...
Error: node_modules/@capacitor/core/types/definitions-internal.d.ts:16:18 - error TS2430: Interface 'CapacitorInstance' incorrectly extends interface 'CapacitorGlobal'.
[ng] Types of property 'Plugins' are incompatible.
[ng] Property 'GoogleAuth' is missing in type '{ [pluginName: string]: { [prop: string]: any; }; }' but required in type 'PluginRegistry'.
[ng]
[ng] 16 export interface CapacitorInstance extends CapacitorGlobal {
[ng] ~~~~~~~~~~~~~~~~~
[ng]
[ng] node_modules/@codetrix-studio/capacitor-google-auth/dist/esm/definitions.d.ts:4:9
[ng] 4 GoogleAuth: GoogleAuthPlugin;
[ng] ~~~~~~~~~~
[ng] 'GoogleAuth' is declared here.
[ng]
i dont understand as it seems how the capacitor.config.json or ts work towards this mission... and i am trying to troubleshoot but i cant figure it out... my config.json file is this
{
"appId": "com.example.app",
"appName": "GuestApp",
"webDir": "www",
"bundledWebRuntime": false,
"plugins": {
"GoogleAuthWeb": {
"scopes": ["profile","email"],
"serverClientId": "610384633692-um9036456eubk8kplvgkrrdgv27tu28h.apps.googleusercontent.com",
"forceCodeForRefreshToken": true
}
}
}
i tried everything at the GoogleAuth attribute of the plugins... i tried GoogleAuth
, googleAuth, even the GoogleAuthWeb that says in the definition... i also dont understand why they change these things over a span of 2-3 months
its not logical...
I assume it's just a problems of TS typings, so you can put the /// reference line above it like in their examples here: github.com/CodetrixStudio/CapacitorGoogleAuth#configure
I have this problem ERROR Error: Uncaught (in promise): Error: "GoogleAuth.init()" is not implemented on web
Error: "GoogleAuth.init()" is not implemented on web
You must use this command:
GoogleAuth.initialize()
Very sketchy. Thanks a lot for clearing things up
zone.js:218 Uncaught {error: 'idp_initialization_failed', details: 'You have created a new client application that use…i/web/guides/gis-migration) for more information.'}
core.mjs:6485 ERROR Error: Uncaught (in promise): Object: {"error":"popup_closed_by_user"}
************Not Working******************
Same error =(
If someone looking for command, that show you the SHA-1 fingerprint:
keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
Thanks Mario!
Thank you, a lot.
You're saving my day all the time. HAHAH :)
You are welcome!