-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initTokenClient never calls call back. #926
Comments
@ulao did you ever find a workaround for this? having the same issue. can get the sign in popup to work just fine, but once it closes, the callback is not invoked. |
For people struggling with this issue, it seems that Google wants your site to either be http, or https with a real (not self signed) certificate. I can't find any documentation that points to this requirement, but I tried changing my https (self signed cert) over to http, and the callback is now firing as expected. |
In my case, it doesn't fire callback because of Header set Cross-Origin-Opener-Policy "same-origin". |
What worked for me was adding an error_callback. It helped me to understand why my callback wasn't being called. |
I'm trying to use this new auth method and nothing seems to work.
Summary
no callback is fired during auth.
Browser(s)/Version(s)
Chrome latest
Expected Behavior
a call back
Actual Behavior
no call back
Steps to Reproduce
This is my code
client = google.accounts.oauth2.initTokenClient({
client_id: CLIENT_ID,
scope: 'https://www.googleapis.com/auth/spreadsheets.readonly',
callback: (tokenResponse) => {
access_token = tokenResponse.access_token;
gapi.client.setApiKey(API_KEY);
gapi.load('client', test() );
I can alert the function google.accounts.oauth2.initTokenClient and it has loaded. but nothing is running in the call back function
The text was updated successfully, but these errors were encountered: