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
popup_closed_by_user when requesting addtional scopes #293
Comments
Hi @john1jan, I think the issue you are facing is that the popup is blocked by the browser. You should not call the |
HI @TMSCH now i used grant() method on click of a button. Now grant method works. But it doesnot have the scope I have requested for. I have requested for contacts.readonly success method is getting called and it logs { |
Oh.god..after wasting a lot of time on this.. found the solution. I dont know why google's doc is so wrong or outdated. If you set options like this it is not working
For getting the scopes you should use the methods
|
@TMSCH is there any particular reason why grant should be called synchronously , because I dont want the user to click on a button and request for additional scope |
@john1jan sorry if the doc was outdated. Could you point me where it is wrong? I don't see the syntax you used in the reference. I will update it though where you found it. You may have been confused with the shorter syntax: googleUser.grant({scope: 'https://www.googleapis.com/auth/contacts.readonly'}) The |
@TMSCH here is the doc. https://developers.google.com/identity/sign-in/web/incremental-auth When is user shorter syntax its is not working. But when I use setScope() method everything works fine |
Thanks @john1jan for pointing out this doc. It should actually work with the shorter syntax, so I'll investigate. Have you resolved your issue with the popup being blocked? |
Consent popup doesn't show up with following code. Below function is called from success callback of google auth button. [Tested on latest chrome on Mac]
No errors in console. I am expecting only consent popup. |
getting popup_closed_by_user when requesting additional scope, Detailed issue is here
I am using this code to request additional scope
The text was updated successfully, but these errors were encountered: