uber / uber-ios-sdk

Uber iOS SDK (beta)
https://developer.uber.com/docs
MIT License
376 stars 125 forks source link

SSO Refresh Token #83

Closed kjanoudi closed 8 years ago

kjanoudi commented 8 years ago

Hey, this is a question. When logging in with SSO/Native login, what does it look like to the end user when I need to refresh the token? Can I do so without them being prompted to authorize my application again?

Typically I would do this on the server, to automatically refresh after expiry - however, I'm not sure how to get the refresh token out and redirect URI of the Native/SSO login so that I can make that refresh request to the uber API on my server. Is that possible?

Thanks

jbrophy17 commented 8 years ago

Beginning with v0.5.2 the RideRequestViewController will attempt to automatically refresh expired tokens for the Native login type. The user won't notice anything if it all goes well, otherwise they will taken through the native login process again.

If you want to handle this on your own, the SDK provides a refreshAccessToken via the RidesClient that you can use to refresh your token from the app. The AccessToken object contains an expirationDate variable you can use to know when it needs to be refreshed

kjanoudi commented 8 years ago

Great, that answers my question. Thank you