stormpath / Turnstile

An authentication framework for Swift.
Apache License 2.0
165 stars 29 forks source link

Add accessToken property to FacebookAccount #28

Closed gomfucius closed 7 years ago

gomfucius commented 7 years ago

This was needed to make Graph API calls after user has successfully logged in with Facebook.

edjiang commented 7 years ago

Thanks! A bit backlogged right now but I will get around to merging in a few changes in the near future =]

gomfucius commented 7 years ago

Is there another way to work with getting access token?

edjiang commented 7 years ago

Unfortunately the way I designed Turnstile was more on the authentication aspect, so there's no way to get the access token currently.

I think this change makes sense, however, it would probably make even more sense to grab other data from the user profile depending on their scopes set in the OAuth2 objects, and directly save it into the Account object.

edjiang commented 7 years ago

@gomfucius merged, although I made a slight change to the PR. I'm keeping the FB/Google access token as an AccessToken credential type. Thanks for your help! Tagging as 1.0.4 in a few mins.