SimplicityMobile / Simplicity

A simple way to implement Facebook and Google login in your iOS apps.
Apache License 2.0
681 stars 66 forks source link

Add optional params to auth providers #6

Closed norman784 closed 8 years ago

norman784 commented 8 years ago

i.e.

Simplicity.login(Google(scopes: ["custom optional scopes"])) { (access_token, error) in
    //....
}
edjiang commented 8 years ago

Hey Norman,

Thanks for posting about this! What do you mean by optional scopes, though? I don't think I've seen a provider (including Google) that has optional scopes. Or, if they do, could you please point me to documentation?

Thanks!

norman784 commented 8 years ago

In my case I need to add extra scopes to have access other google services, like gmail, for facebook will be the same, maybe you need to ask the user extra permissions to have access to birthday, likes, etc.

This library its great, b/c its too easy to authorize this two services, and adding custom scopes will not precisely add more complexity to the library, b/c will be optional (if none its set then use the default scopes)

edjiang commented 8 years ago

Thanks for the feedback! Is this what you are looking for?

https://github.com/SimplicityMobile/Simplicity#requesting-scopes

There's no Google example, but this works for Google too.

norman784 commented 8 years ago

Indeed, its what I was looking for