GoogleClientPlugin icon indicating copy to clipboard operation
GoogleClientPlugin copied to clipboard

Clear User Cache

Open Axemasta opened this issue 4 years ago • 0 comments

I can successfully log into google using this plugin, i would like to sign out and make the device available to be signed in by other others.

The first time I run this app I get the following screen

First time running the app

I am able to login as user 1 (myself) and do my business in the app. I decide to logout as user 1 and login as user 2. To logout of the app i've made sure to call CrossGoogleClient.Current.Logout();.

I would now like to login as user2, unfortunately the browser has remembered user1 and their account is available to sign in with. This account is cached so credentials are not needed in order to login as this user.

Logging in a second time

I would like to clear the user cache and force users to enter credentials every-time they try logging into my app.

Is this currently possible? I have done the same thing with microsoft login:

AuthenticationResult authResult = await _pca.AcquireTokenInteractive(MicrosoftAuthConstants.Scopes)
                ......
                .WithPrompt(Prompt.ForceLogin) //This will prevent the browser from displaying other accounts
                ......
                .ExecuteAsync();

Axemasta avatar Dec 08 '20 12:12 Axemasta