Skip to content

Scopes not working for Google on Android #29

Closed
@jasongrishkoff

Description

@jasongrishkoff

Hi 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions