google-signin

Google People Api: Country not returned in Adresses field

[亡魂溺海] 提交于 2021-02-11 12:41:17
问题 I am trying to get the authenticated user's country by specifying "addresses" field in the People Api request as specified here. This is the code: router.post("/test_scope", (req, res) => { const { idToken, accessToken } = req.body; authenticationServices .validateGoogleAccessToken(idToken, accessToken) .then((response) => { res.json(response); }); }); const validateGoogleAccessToken = async (idToken, accessToken) => { try { const CLIENT_ID = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.apps

Asp.Net Core google-signin oauth restrict access and get g-suite roles

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-08 16:33:28
问题 I am making a .NET Core application with web views where I need to authenticate users with Google+ sign-in. I followed this ( https://docs.microsoft.com/en-us/aspnet/core/security/authentication/social/google-logins ) tutorial, and can now sign in user my google account. So far so good. How do I restrict access to my application to only users within a certain domain? How do I retrieve the authenticated users roles defined in g-suite? I have tried to add scopes to the authentication options in

How to check if user is already logged in using Google Sign in and Firebase Auth to retrieve their data?

自闭症网瘾萝莉.ら 提交于 2021-02-08 15:27:53
问题 I have a simple game made in Flutter and I can log in the user but I don't know how to check if the user is logged and how to get user's data if so. For log in I am using this method, after log in the user I can get his data: Future<String> signInWithGoogle() async{ print("INICIALIZANDO LOGIN COM GOOGLE..."); googleSignInAccount = await googleSignIn.signIn(); googleSignInAuthentication = await googleSignInAccount.authentication; final AuthCredential credential = GoogleAuthProvider

How to check if user is already logged in using Google Sign in and Firebase Auth to retrieve their data?

安稳与你 提交于 2021-02-08 15:27:11
问题 I have a simple game made in Flutter and I can log in the user but I don't know how to check if the user is logged and how to get user's data if so. For log in I am using this method, after log in the user I can get his data: Future<String> signInWithGoogle() async{ print("INICIALIZANDO LOGIN COM GOOGLE..."); googleSignInAccount = await googleSignIn.signIn(); googleSignInAuthentication = await googleSignInAccount.authentication; final AuthCredential credential = GoogleAuthProvider

“Cannot read property 'load' of undefined”

白昼怎懂夜的黑 提交于 2021-02-08 13:58:11
问题 I'm attempting to follow this documentation to integrate with Google sign in, though I'm running into this error in console: Uncaught TypeError: Cannot read property 'load' of undefined at script.js:1 script.js : window.gapi.load('auth2', function() { console.log('Loaded!'); }); I get the error about half of the time, and inspecting the network panel in Chrome, it only happens when the following resource is not loaded: https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.d2dliHDvPwE.O

Ask for password when logging in using Google Sign-In API

不打扰是莪最后的温柔 提交于 2021-02-08 04:43:19
问题 I've integrated Google's Sign-In API on my Android App and it is working fine with its "out of the box" functionalities. Now, I would like it to prompt users to re-authenticate whenever they are linking a Google account (by supplying its credentials). This is to ensure that the one linking the account is indeed its owner. I've searched related posts and they say this feature is not yet present on the current API . I hope someone has an idea on how could I implement this. 来源: https:/

ios google sign in not getting profile scope

眉间皱痕 提交于 2021-02-07 08:22:32
问题 I implemented a while ago google sign in on my app. everything was working. Im requesting a google profile and email scopes and when calling https://www.googleapis.com/oauth2/v3/tokeninfo?id_token= with the token i received in the app and i got the user profile. today i run the code and i get the token without the profile only email and email verified. log in via android and via web return with profile. the only problem is with the ios. i can see also that the idtoken in ios is smaller then

ios google sign in not getting profile scope

天涯浪子 提交于 2021-02-07 08:20:08
问题 I implemented a while ago google sign in on my app. everything was working. Im requesting a google profile and email scopes and when calling https://www.googleapis.com/oauth2/v3/tokeninfo?id_token= with the token i received in the app and i got the user profile. today i run the code and i get the token without the profile only email and email verified. log in via android and via web return with profile. the only problem is with the ios. i can see also that the idtoken in ios is smaller then

MissingPluginException(No implementation found for method init on channel plugins.flutter.io/google_sign_in) after publishing to Google Play Store

女生的网名这么多〃 提交于 2021-02-05 07:31:50
问题 I asked a similar question before, but I am having trouble with Google Sign-in after publishing my app to internal and closed testing on the Play store. It works perfectly well on emulators for both Android and iOS, works great on real devices when I run it from my computer in debug and release modes, but once published to the Play store, everything breaks. The error I get is MissingPluginException(No implementation found for method init on channel plugins.flutter.io/google_sign_in) Is there

How do I switch to a different view controller from the App Delegate?

末鹿安然 提交于 2021-01-29 20:22:16
问题 Once the user signs in with Google, I want to take them to the home screen; however, the code does not fully execute this. This is the code: func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) { if let error = error { if (error as NSError).code == GIDSignInErrorCode.hasNoAuthInKeychain.rawValue { print("The user has not signed in before or they have since signed out.") } else { print("\(error.localizedDescription)") } return } let firstName = user