Scopes not working for Google on Android
See original GitHub issueHi there,
I’m trying to pass scope to Google as follows:
manager.authorize('google', {scopes: 'profile email'})
.then(resp => this.cleanLoginData('google',resp.response))
.catch(err => console.log('There was an error'))
However, that doesn’t seem to provide the email when I try to call manager.makeRequest(‘google’,googleUrl) to https://www.googleapis.com/oauth2/v1/userinfo?alt=json.
The solution was to go into android/src/main/java/io/fullstack/oauth/OAuthManagerProviders.java and change line 101 to String scope = “profile email”;
Is this a known issue, or am I doing something wrong? I notice that a lot of the language in the java files refers to “scope” rather than “scopes” (with the “s”), as passed in the above authorize code snippet. Could this be the issue?
Thanks! Jason
Issue Analytics
- State:
- Created 7 years ago
- Comments:26 (22 by maintainers)
Top Results From Across the Web
Requesting Additional Scopes | Authentication
Whenever a user performs an action that requires a scope that isn't requested at sign-in, call GoogleSignIn.hasPermissions to check if the ...
Read more >Cannot set scope Google sign in on Android - Stack Overflow
I use Google API for signin on Android app ...
Read more >Control which third-party & internal apps access Google ...
You use settings in the Google Admin console to govern access to Goo. ... Some apps use OAuth 2.0 scopes—a mechanism to limit...
Read more >DevicePolicyManager - Android Developers
An ArrayList<String> corresponding to the delegation scopes given to an app in the ... Returns true if the caller is running on a...
Read more >Shot Scope - Apps on Google Play
The official companion app for Shot Scope GPS devices, including V3, H4, G3 and V2, is available to download on Android devices. The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try including
scope
in the config constant along with theclient_id
andclient_secret
instead of in the options hash like so:Maybe this could help, setting the credential’s scopes into fully qualified URL separated by ‘+’ will also work for you:
But BTW i have another error that appears after the scopes’ hand check, cf: #61
is anyone is receiving the same error, in XCode logs: { status: ‘error’, msg: ‘The operation couldn’t be completed. (NSURLErrorDomain error -1012.)’ }