OneDrive / onedrive-sdk-ios

OneDrive SDK for iOS
https://dev.onedrive.com
Other
100 stars 88 forks source link

The accessToken expired time get from sdks is too short #138

Closed slunlun closed 8 years ago

slunlun commented 8 years ago

Hi, I am writing APP about OneDrive, and store the account session on local disk. I notice that the account session get from SDK do not have refresh token, so I can only use the access token for very short time. Is there anyway to get account session with refresh token by iOS SDK?

kevklam commented 8 years ago

You'll need to include the 'offline_access' scope when setting up your ODClient:

[ODClient setMicrosoftAccountAppId:@"{id}" scopes:@[@"onedrive.readwrite,offline_access"]]