OneDrive / onedrive-sdk-android

OneDrive SDK for Android!
https://dev.onedrive.com
Other
148 stars 52 forks source link

Restore OneDrive session with existing access token #73

Closed OlegRy closed 8 years ago

OlegRy commented 8 years ago

Is there any way to restore session in OneDrive if I have an access token which was received earlier (e.g. I authorized in OneDrive on another device and got access token and then I need restore session with the same token)?

peternied commented 8 years ago

When requesting scopes by adding the wl.offline_access scope the authentication response will include a refresh token which can be used to acquire a new access token without a interactive login flow.

If you use the MSAAuthenticator, this will automatically store/manage/use this refresh token. To see a full application example that uses the offline access scope of scenario see, the OneDrive Explorer for Android, and look here for the MSAAuthenticator configuration.

peternied commented 8 years ago

Closing out this issue, please reopen this is still a problem.