google-oauth

How to use Google Drive Client Library for Java with my homegrown OAUTH 2 Framework for web application?

荒凉一梦 提交于 2020-01-24 19:28:24
问题 My web application already does OAUTh authentication successfully with Facebook, LinkedIn, Google etc. using REST and/or signpost-oauth library. So once I already have ACCES_TOKEN from GoogleAPIs server using my web app , I want to use Google Drive Client to access files etc. This is the google Drive example but it relies upon using Google authorization code flow ( which I can't understand well enough to use with my Java EE web app ) // authorization Credential credential = authorize(); //

OAuth consent screen not showing

爷,独闯天下 提交于 2020-01-24 17:44:25
问题 Recently implemented Google sign-in in my local dev. Everything works fine, except when I choose one of my Google accounts to log in, the consent screen does not show up. It does get authorized, as I can see my website in Apps connected to your account section of My Account. I have already configured OAuth consent screen under Credentials section of APIs & Services console. Not sure why it's not showing up? I tried sending approval_prompt=force but it had no effect. Also tried prompt=select

Getting error 500 when trying to obtain access token from authorization code

别来无恙 提交于 2020-01-24 02:48:07
问题 Before this question gets closed as too specific I quote from the official Google OAuth Group: As of March 4, 2013, discussion on this group has move to google-oauth tag on Stack Overflow We support the Google OAuth2 on Stack Overflow. Google engineers monitor and answer against the tag google-oauth. You should use this tag when asking questions. Starting this morning (2014-07-18) some of my users are getting error 500 Internal Server error with payload { "error" : "internal_failure" } when

not receiving “Refresh Token” even in the first consent - Google API

落花浮王杯 提交于 2020-01-24 01:37:28
问题 I'm being redirected to the Google Consent for the first time and asked if I allow this application to manage Gmail account and stuff. And when I'm redirected back, refresh token is null. +token:"ya29.Gls1BTQIRIuCW2dnzIpQlciOZNpidhjfsoidjfsomethingsm" +refreshToken: null +expiresIn: 3600 I know Refresh Token comes null on subsequent requests. But this was the first request I made. Is there something I need to do on the console side. 回答1: Solved it. I forgot to set access_type to offline

chrome extension needs offline access from server side

梦想与她 提交于 2020-01-23 12:26:09
问题 I am building a chrome extension. I used chrome.identity.getAuthToken to get the access_token. This provided me the access_token at the client side ( browser ) . Now I want to pass this access_token to my server. I want to have offline access to granted APIs, I understand that for this I have to exchange it with the long-live-token and refresh token. Is there a secure way to pass access_token to server? Or should I use htttp post? Another way is to redirect the user to server to have both the

Google Service account user interfece

为君一笑 提交于 2020-01-23 04:56:08
问题 How can I login to a Google Service account with the normal web user interface, for example to google drive ? Now I can only login using API using script. 回答1: You cant. A service account is a sudo user type thing. Yes it has a Google drive account, Google calendar ... but you cant log in to the web interface for Service accounts. Option / work around / Tip: There is a slight workaround. You could have the service account give your Google account access to a directory on its Google drive.

What is wrong with this POST request implementation?

杀马特。学长 韩版系。学妹 提交于 2020-01-23 04:35:07
问题 I have been working around Google OAuth 2.0 with java and got struck with some unknown error during implementation. The following CURL for POST request works fine: curl -v -k --header "Content-Type: application/x-www-form-urlencoded" --data "code=4%2FnKVGy9V3LfVJF7gRwkuhS3jbte-5.Arzr67Ksf-cSgrKXntQAax0iz1cDegI&client_id=[my_client_id]&client_secret=[my_client_secret]&redirect_uri=[my_redirect_uri]&grant_type=authorization_code" https://accounts.google.com/o/oauth2/token And produces the

how to Get the access token using oauth.js client library?

风流意气都作罢 提交于 2020-01-23 03:45:49
问题 I'm able to get request token verifier from the library(http://oauth.googlecode.com/svn/code/javascript/), But got stuck in getting the access token.. can someone tell me where i'm doing it wrong? function goForAccessRequest1(verifier){ var url2 = "http://www.google.com/accounts/OAuthGetAccessToken"; var accessor2 = { token: OAuthToken, //tokenSecret: OAuthTokenSecret, signatureMethod : "HMAC-SHA1", consumerKey : "1010722015153-i8tisqmaqch26b0muqvefbfp3h18m862.apps.googleusercontent.com", /

Forcing a user to choose an account via Google OAuth2

烈酒焚心 提交于 2020-01-21 04:10:27
问题 I have the following workflow in my application: user logs into my custom app user clicks a button to link their YouTube account application makes a server side request using the code listing below user is redirected to the google auth url At this point, one of two things happens: [I never want this behaviour] - If the user is logged into exactly one Google account (i.e. gmail, Google Apps for Domains, etc...) the user is never asked to choose which account to link. It just assumes they want

Google Coordinate OAuth2 with Service Account

痞子三分冷 提交于 2020-01-20 08:41:27
问题 I have a C# console application with Google Coordinate .Net library and Service Account open authentication. private const string SERVICE_ACCOUNT_EMAIL = "XXX@developer.gserviceaccount.com"; private const string SERVICE_ACCOUNT_PKCS12_FILE_PATH = @"<path-to-private-key-file>\YYY-privatekey.p12"; private const string GOOGLE_COORDINATE_TEAM_ID = "ZZZ"; private CoordinateService BuildService() { X509Certificate2 certificate = new X509Certificate2(SERVICE_ACCOUNT_PKCS12_FILE_PATH, "notasecret",