Last active
April 24, 2017 08:16
-
-
Save mmierzwa/a11c66cbfd13caf1aa65908c58f22ee1 to your computer and use it in GitHub Desktop.
Cleaning ADAL token cache on Android and iOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoginCheckAppStart : MvxNavigatingObject, IMvxAppStart | |
{ | |
private readonly IApplicationSettings _applicationSettings; | |
private readonly ISecureStorageService _secureStorage; | |
public LoginCheckAppStart(IApplicationSettings applicationSettings, ISecureStorageService secureStorage) | |
{ | |
_applicationSettings = applicationSettings; | |
_secureStorage = secureStorage; | |
} | |
public void Start(object hint = null) | |
{ | |
if (_applicationSettings.IsUserLoggingForFirstTime) | |
{ | |
_secureStorage.RemoveAdalRecords(); | |
ShowViewModel<LoginViewModel, object>(null); | |
} | |
else | |
{ | |
ShowViewModel<MainViewModel, object>(null); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment