OneDrive / onedrive-sdk-ios

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

One drive auth token renew #144

Closed kjoneandrei closed 7 years ago

kjoneandrei commented 7 years ago

Hi, In order to authenticate an user in my app (for the one drive functionality) i use: [ODClient clientWithCompletion:^(ODClient client, NSError error){

Though everytime I authentificate a user for the first time this works well, after an hour passes the auth token expires so I get errors regarding the user (since he is not authenticated anymore). Same happens when the user closes the app and reopens it .. i call the same method but it doesn't work so first i have to log the user out and the ask him to log in again which is annoying

Any fix for this?

kjoneandrei commented 7 years ago

ps. offline_access is added as a scope
ODClient.setMicrosoftAccountAppId(oDClientId, scopes: ["onedrive.readwrite", "offline_access"])