google-oauth2

Access Google spreadsheet from Google Appengine with service account : working once per hour

自作多情 提交于 2019-12-04 18:50:47
I have implemented the python code here below based on the documentation in order to access a spreadsheet accessible through a public link. It works once every hour. If I execute a few seconds after a success, I receive an error : Error opening spreadsheet no element found: line 1, column 0 Assumption: The access token has an expiry date of 1 hour. So the appengine would proceed to a token refresh after an hour, resetting the whole. Question: This code requests a new token for each request. So what should I do ? Save the token ? When I try the token_to_blob in order to save the token, I get an

Google oAuth2 tokens invalidated more and more

安稳与你 提交于 2019-12-04 17:51:22
I have a web app built on oAuth2 that has been in production for 5+ years. Users Authenticate and Authorize with Google and grant my application access to the Google Analytics data. All of a sudden I am seeing a surge in failures when refreshing my users oAuth2 tokens. This is the call: https://accounts.google.com/o/oauth2/token Passing these parameters: client_id=xxyyzz client_secret=xxyyzz grant_type=refresh_token refresh_token=xxyyzz This seems to be be on accounts that are less active (i.e. it could be 15+ days between instances where we make calls on their behalf). I have to reach out to

Google app script web app, how to create a login button?

余生长醉 提交于 2019-12-04 17:15:32
I have create script backed by a Google Spreadsheet in Google Drive and published it as a web app, setting "Execute the app as: me" and "Who has access to the app: Anyone, even anonymous". The main page serves html content from the spreadsheet. The basic functionalities are: a "random internet user" is able to see some informations, while an user logged with his Google Account is able to submit information as well. The issues is - if I set the permission to "anyone" people are first redirected to the standard google login page, and once logged in have to accept the script permissions. Once

Get user information from Google OAuth PHP API

怎甘沉沦 提交于 2019-12-04 15:45:10
I would like to get user information like name, family name, email address, image and etc. After login to the website by Google account, I've used the following PHP code: <?php ########## Google Settings.. Client ID, Client Secret ############# // I fill these fieds with my keys $google_client_id = '............'; $google_client_secret = '...............'; $google_redirect_url = '.......................'; $google_developer_key = '............'; ########## MySql details (Replace with yours) ############# // I filled these fields with my data $db_username = "*******"; //Database Username $db

How to change Google consent screen email?

余生长醉 提交于 2019-12-04 15:38:45
问题 I created new Google Play game and would like to change the email displayed on Google Consent Screen. Google Developers Console screen has a dropdown to choose email, but just one - admin's email - is here. I've added another user as the owner, but it is not appeared on the consent screen. 回答1: You need a second email address then add that person / email as admin of the project. Then you will be able to add that email in the consent screen. 回答2: If you want to change the email address that is

how to remove openid since google auth is depreciated?

只谈情不闲聊 提交于 2019-12-04 15:25:36
As per the latest circular, google plus oauth is depreciated. As per my understanding, i should be concerned only if i am using plus.me in my code. My code: google = oauth.remote_app( 'google', consumer_key=app.config.get('GOOGLE_ID'), consumer_secret=app.config.get('GOOGLE_SECRET'), request_token_params={ 'scope': ['https://www.googleapis.com/auth/userinfo.email'], 'access_type': 'offline', 'approval_prompt':'force' }, base_url='https://www.googleapis.com/oauth2/v1/', request_token_url=None, access_token_method='POST', access_token_url='https://accounts.google.com/o/oauth2/token', authorize

Behaviour of mobile app browsers with Google sessions and Account Chooser

余生颓废 提交于 2019-12-04 00:33:51
Problem : Trying to create SSO between mobile app. and browser. What we have: We have an ionic mobile app. with "Login with Google" using OAuth 2.0 authentication. We have multiple inhouse apps that works on OAuth2 and SAML hence, we have SSO enabled for GSuite so that all apps work seamlessly with one login and password. Now when we hit the "Login with Google" button, Opens to SSO login page in a browser app. We have SSO enabled hence we have set login_hint, which helps us in directly takes us to SSO login page. User inputs useremail and password and it redirects to the redirect_uri post

How to set GOOGLE_APPLICATION_CREDENTIALS without using a path

ε祈祈猫儿з 提交于 2019-12-03 20:33:45
I'm developing a CMS module that needs to use Google OAUTH 2 for server to server applications. According to the official manual one needs to set an environment variable with the path to .json key like so: putenv('GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json'); And here is the tricky part. If I'd use it in a stand-alone web application, then there wouldn't be any problem, but since I'm working on a CMS module, storing that file on a drive or creating any kind of hooks associated with the use of this file would pose a potential security threat since I already see how one could

How do you restrict Google Login (Oauth2) to emails from a specific Google Apps domain for a Flask WebApp?

不问归期 提交于 2019-12-03 13:40:48
问题 Developing a Flask app (Python3/Heroku) for internal company use and successfully implemented Google Login (Oauth2) based on brijieshb42's article which uses requests_oauthlib. Research has indicated that if I pass parameter "hd" (hosted domain) in my authorization url it should do the trick. E.g. https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=OUR_CLIENT_ID&redirect_uri=https%3A%2F%2FOUR_APP.herokuapp.com%2Fconnect&scope=profile+email&state=STATE &hd=our_google_apps

How do I add “authorized redirect URIs” to Google OAuth2 using an API?

↘锁芯ラ 提交于 2019-12-03 12:36:17
I'm trying out Heroku's new "Heroku Review Apps" feature. It creates a new Heroku App whenever you create a new pull request in github for a given project. I'm trying to get Google OAuth2 support working with them, but each created app has a new URL. e.g. https://my-app-pr-124.herokuapp.com The problem is that when a user tries to sign in on this new app, Google won't allow redirecting the user back to the app, since Google doesn't trust that URL yet. I can include my own Google API key with my app, and run a script on deploy, but how can I inform Google that this new URL should be trusted for