OneDrive / onedrive-sdk-dotnet-msa-auth-adapter

Other
25 stars 22 forks source link

Add methods to restore user session from cache without showing sign in UI #17

Closed ericpapamarcos closed 8 years ago

ericpapamarcos commented 8 years ago

In 1.0.4, support was added to cache and restore a session so that it was unnecessary to prompt the user to sign in each time the service was accessed. However, this new method coupled together restoring the session and showing the sign in UI if the credentials were invalid.

This is problematic because there are several scenarios where it's important to separate out restoring a session and showing sign in UI:

To address these scenarios, this change adds a new set of methods that only restores the session without showing the sign in UI.

Tested changes with a UWP targeting the 14393 SDK, both in the foreground and in a background task.

ericpapamarcos commented 8 years ago

@cdmayer, any feedback?

cdmayer commented 8 years ago

Thanks for the PR @ericpapamarcos. Actually before I can review this I need to add @msftclas to the project. Working on getting that added. Hang tight...

ericpapamarcos commented 8 years ago

Oh wow, that was fast! Didn't even get a chance to add a comment. 👍

cdmayer commented 8 years ago

:D Going to get this into the next package on Nuget, too. Stay tuned...