OneDrive / onedrive-sdk-csharp

OneDrive SDK for C#! https://dev.onedrive.com
Other
293 stars 143 forks source link

[v2] Session expires #172

Closed tgckpg closed 8 years ago

tgckpg commented 8 years ago

In OneDrive SDK v2, session will expires on a very short period of time even when using CredentialVault ( about 1 ~ 2 hours ). However in SDK v1, session never expires.

This is inconvenient because it require user to re-enter their credential every time they open my app ( it is a store app ).

For now I'll be falling back into v1.

FYI, here's the relevant commit I've used for v2

cdmayer commented 8 years ago

Take a look at v1-maintenance.

CredentialVault is supposed to hold your session then renew it automatically. It won't work if you don't request the offline_access scope and provide the client secret. Have you tried that?

tgckpg commented 8 years ago

Adding the wl.offline_access scope will add the permission:

Which is a bit misleading for the users because they might think I am accessing their personal info, anytime. In fact, I just want my app to do things on it's own folder only.

In v1, I didn't need to define wl_offline_access to have the session automatically renewed.

Anyway, was there a policy changes so that I MUST have the wl.offline_access scope defined ( in order to have session auto renewed ) ? If that's the case I might need to stay in v1 until the support has ended.

Also, wasn't the wl.signin already served the purpose of Automatically signing you in ? Which is also stated on here.

cdmayer commented 8 years ago

I see. You are basically asking for OnlineIdAuthenticator support. That is high on the list right now.

The documentation you linked to is for the Live SDK, which is deprecated.