Skip to content
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

Google login keeps asking for authorizations #33

Open
jeromeboursier opened this issue Nov 24, 2016 · 1 comment
Open

Google login keeps asking for authorizations #33

jeromeboursier opened this issue Nov 24, 2016 · 1 comment

Comments

@jeromeboursier
Copy link

Hi everyone,

I was wondering why this strange behavior happen in my project : every time I try to re-connect to an account I already logged into, the Google Explorer (whom already know my password) keep asking me authorizations, even if it's my 3rd login to the same account.
If I take a look at the Google documentation, it shouldn't be asking me permission over time :

Before making the first authenticated call, the Explorer asks you to choose which scope you would like to use when granting it access to your data.

Here's the code responsible for the login, but I guess this behavior doesn't come from him :)

let google = Google()
google.scopes = ["email"]
google.login { [unowned self] (accessToken, error) in
    if let token = accessToken {
        print("Call Google API with token : \(token)")
    }
}

So I was wondering if you guys know about that, and if a workaround exists :)

Thank you!
Jérôme

@edjiang
Copy link
Member

edjiang commented Dec 5, 2016

Hey Jerome,

I haven't responded to this yet because I don't quite remember the intricacies of the Google API, and haven't looked into it recently. However, from my knowledge about the Google APIs (at least from a mobile perspective), I thought Google's policy was to always show the authorization screen. Is it different with the Google SDK for iOS -- do you get the auth screen there too on subsequent logins?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants