googlesigninaccount

Android: Google Sign In - difference between 'DEFAULT_SIGN_IN' and 'DEFAULT_GAMES_SIGN_IN'

℡╲_俬逩灬. 提交于 2020-12-06 06:54:16
问题 I am trying to implement a Google Sign In into my app in AndroidStudio. I have it working with: GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN).requestEmail().requestServerAuthCode(clientID).build(); I have my client ID correctly set up to the Web Application Client ID from the API console and SHA1 is definitely set up correctly. When i change to this (using DEFAULT_GAMES_SIGN_IN instead): GoogleSignInOptions gso = new GoogleSignInOptions.Builder

Google SignIn API Exception 10

佐手、 提交于 2020-01-01 11:43:06
问题 Approaching to the final stage of the authentification, but something is going wrong in handleSignInResult method. It returns Exception code 10 (Developer error) in logs. Google provides comprehensive description: The application is misconfigured. This error is not recoverable and will be treated as fatal. The developer is an idiot... What should I do to handle this (get an account) and finally retrive values from account? Thank you in advance for your help!!! MainActivity: package ru

Silent sign in to retrieve token with GoogleApiClient

时光怂恿深爱的人放手 提交于 2019-12-28 05:44:28
问题 I am using "Google Sign-In" in my app. Hence I use the class GoogleApiClient to get the user email and the ID token that I need for my backend. When the user signs in, then I have access to an Activity (of course) and I use that Activity to let the GoogleApiClient handle the UI lifecycle stuff by calling builder.enableAutoManage(myActivity, ...) This works fine. However, at a later stage (several days later), I need to get a new token (for some reason that I will not go into further here). I

Silent sign in to retrieve token with GoogleApiClient

落花浮王杯 提交于 2019-12-28 05:44:26
问题 I am using "Google Sign-In" in my app. Hence I use the class GoogleApiClient to get the user email and the ID token that I need for my backend. When the user signs in, then I have access to an Activity (of course) and I use that Activity to let the GoogleApiClient handle the UI lifecycle stuff by calling builder.enableAutoManage(myActivity, ...) This works fine. However, at a later stage (several days later), I need to get a new token (for some reason that I will not go into further here). I

Google Signin returns display name as null only when Add account in the flow

偶尔善良 提交于 2019-12-22 08:59:11
问题 In my current project I have implemented google sign in feature. Am fetching user information when logged in. In the flow, there is option to Add Account in google dialog. When user trying to add account on that time I am getting the email properly but the display name as null. Here is the code which am using for sign in google. GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestEmail() .requestProfile() .requestScopes(new Scope(Scopes.PLUS

Use authorized Google Cloud Endpoints with Google Sign in

最后都变了- 提交于 2019-12-21 17:02:08
问题 I have an app that uses Google Cloud Endpoints. Some methods need authorization so I followed this tutorial. This requires the GET_ACCOUNTS permissions. I am updating the app to work with runtime permissions. I do not like to request permission to read contacts, but GET_ACCOUNTS is in the same group. Because of this I am looking to use authorization without GET_ACCOUNTS permission. I think that Google Sign In could work but I am unable to find a way to use the result from Google Sign In. This

Authorize youtube data api request using google sign in api

别说谁变了你拦得住时间么 提交于 2019-12-11 07:57:02
问题 i am trying to authorize a youtube data request (scope) using google sing in api. Google Sign In works perferct inside my app and i am getting logged in. How do I use the result of the google sign in api to send a request to a youtube data api scope? My Sign In: GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestScopes(new Scope("https://www.googleapis.com/auth/youtube")) .build(); api = new GoogleApiClient.Builder(main.getApplicationContext

GoogleSignInAccount returns null

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-07 14:04:49
问题 I am trying to use the latest Google API. I set up all the dependencies as suggested by Google. compile 'com.google.android.gms:play-services:9.0.0' and also created a google-service.json. Enable the Google API in a console... I think everything is supposed to work. I can login with Google reference and intent. But after getting a callback GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data); if (result.isSuccess()) { GoogleSignInAccount acct = result

Google Sign In - GoogleIdTokenVerifier verifies token with delay

谁说我不能喝 提交于 2019-12-06 06:39:30
问题 I have implemented back-end which receives Google Sign In token from Android or iOS device and tries to verify it. Code has worked properly few months ago, it has not changed but recently it began to reject all tokens as invalid. When I try to repeat verification again with previously failed token after ~10s of its issue time, it begins to work and returns user information. Why does it happen? try { GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(new NetHttpTransport(), new

GoogleSignInAccount returns null

末鹿安然 提交于 2019-12-05 21:28:43
I am trying to use the latest Google API. I set up all the dependencies as suggested by Google. compile 'com.google.android.gms:play-services:9.0.0' and also created a google-service.json. Enable the Google API in a console... I think everything is supposed to work. I can login with Google reference and intent. But after getting a callback GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data); if (result.isSuccess()) { GoogleSignInAccount acct = result.getSignInAccount(); if (listener != null) { listener.onSuccess(acct); } } in GoogleSignInAccount all properties