google-oauth2

How does Google Sign in for Android work without a redirect uri?

允我心安 提交于 2020-04-18 05:36:16
问题 The Google Sign in library on Android works without specifying any redirect uri. Why is this the case? To which endpoint does Google send the access code to after the user logs in? And how does it redirect the user back to the app? Thanks. 回答1: Now I see, the redirect uri is in fact the app itself, using a uri that points to a page on the app, not to any website. The redirect uri can be set up in the Android app by using the information here: https://developer.android.com/training/app-links

Google cloud 'http' does not match the ones authorized for the OAuth client

雨燕双飞 提交于 2020-03-26 03:52:26
问题 I try to run my google cloud application in the localhost and need to use 'http' due to SSL issues. But when I try to sign in, I get this error. What I try to do is add the URI to the OAuth client, but the problem is that it does not let me add 'http' to the OAuth. I can add 'https' but that does not work. Is there a way that i can register 'http' on google cloud or is there another workaround? 来源: https://stackoverflow.com/questions/59776405/google-cloud-http-does-not-match-the-ones

Google Authorized redirect URIs

◇◆丶佛笑我妖孽 提交于 2020-03-20 03:08:11
问题 Let's say my app's main domain is at https://www.example.com App is going to have lots of instances, i.e. https://www.example.com/client1 https://www.example.com/client2 https://www.example.com/client3 <..> In order to have OAuth2 authentication against my app, I currently have redirect URIs as such: https://www.example.com/client1/SignInGoogle https://www.example.com/client2/SignInGoogle Is there a way to add one Authorized redirect URI for all of these clients? i.e. https://www.example.com/

Google Authorized redirect URIs

。_饼干妹妹 提交于 2020-03-20 03:07:08
问题 Let's say my app's main domain is at https://www.example.com App is going to have lots of instances, i.e. https://www.example.com/client1 https://www.example.com/client2 https://www.example.com/client3 <..> In order to have OAuth2 authentication against my app, I currently have redirect URIs as such: https://www.example.com/client1/SignInGoogle https://www.example.com/client2/SignInGoogle Is there a way to add one Authorized redirect URI for all of these clients? i.e. https://www.example.com/

Google's OAuth 2.0 for installed apps and Client Secret not being a secret

╄→尐↘猪︶ㄣ 提交于 2020-03-18 07:00:31
问题 It appears that Google has been modernizing OAuth interactions for native apps as announced initially here https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html and as evidenced by their current documentation pages https://developers.google.com/identity/protocols/OAuth2InstalledApp I have been able to run the sample console app in the referenced github repo successfully. This flow exchanges the authorization code for an access token using the client

setToken doesn't switch YouTube channel in Google API (gapi)

血红的双手。 提交于 2020-02-27 12:50:15
问题 I've got a problem that I cannot solve. I want to allow users to connect to multiple youtube channels at once and create youtube streams for them. The main code looks like this: export const setGapiTokenForTarget = async (token) => { await window.gapi.client.setToken(token); await window.gapi.auth.setToken(token); }; export const bindStreamToBroadcast = async (streamId, broadcastId, token) => { await setGapiTokenForTarget(token); return window.gapi.client.youtube.liveBroadcasts.bind({ 'id':

Use Google::Auth::Stores::FileTokenStore with database

旧时模样 提交于 2020-02-24 12:11:05
问题 I'm trying to implement a 3 legged authentication in my app to the Google API, to be able to access registered users' Google Calendars. In the quickstart Ruby guide, this command comes up that as far as I understand should point to the user's tokens: token_store = Google::Auth::Stores::FileTokenStore.new(file: CREDENTIALS_PATH) It expects the tokens stored in a file (or Redis), but (of course) I store each user's tokens in my database (Postgres). Have I understand the purpose of the command

AWS Cognito - How to force select account when signing in with Google

大兔子大兔子 提交于 2020-02-21 11:04:06
问题 I'm currently using Cognito User Pools, federated with Google as an identity provider, to handle user sign in for my web app. At the moment, I have only implemented Sign-In with Google. This is currently being done through Cognito's Hosted UI. When users sign in with Google, I'd like them to always be prompted to select their account, i.e. be presented with this prompt. However, I have found that when I'm logged in with only one Google account, then this screen is skipped. Although, when I'm

How to do simple google script api with php

瘦欲@ 提交于 2020-02-04 05:27:28
问题 I am trying to figure out how to call a google script via the api from php. Here is my script: function doGet() { return ContentService.createTextOutput("hello world!"); } I can call it as a web app via it's URL but what I am trying to accomplish will require it be called via the API. Google's documentation is so confusing it's almost useless. This seems like it would be such a simple task but I'm getting nowhere fast. Does anyone know where to find a simple step by step tutorial or can

How to turn on/off CloudSQL instances using Python3

我怕爱的太早我们不能终老 提交于 2020-02-02 17:28:09
问题 I'm trying to use a Python script to turn on/off a CloudSQL Instance in GoogleCloud. I've finally found a way to do it, using the GoogleCloudAPI, in Shell: ### shell script ACCESS_TOKEN="$(gcloud auth print-access-token)" ACTIVATION_POLICY="ALWAYS/NEVER" # Use 'ALWAYS' to turn on, 'NEVER' to turn off curl --header "Authorization: Bearer ${ACCESS_TOKEN}" --header 'Content-Type: application/json' --data '{"settings" : {"activationPolicy" : "${ACTIVATION_POLICY}"}}' -X PATCH https://www