Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Android no Play-store fallback & change/logout user #7

Open
sauvainr opened this issue Jan 24, 2016 · 0 comments
Open

Android no Play-store fallback & change/logout user #7

sauvainr opened this issue Jan 24, 2016 · 0 comments

Comments

@sauvainr
Copy link

Hello there,
First thanks for the plugin!

In the case the Play-store in not present, the fallback is used, no problem there.

However I cannot figure out how to switch or logout user.

The flow:

  1. Authenticate the user A: chrome.identity.getAuthToken -> Ok you can enter you user credentials
  2. logout: chrome.identity.removeCachedAuthToken -> seams remove the token.
  3. Launch the authentication flow again to change the user: chrome.identity.getAuthToken -> Fail : Same user token get retrieved without prompt the user credentials

Edit: I just found the following lines in the plugin code:

if ("removeCachedAuthToken".equals(action)) {
callDetails.token = args.getString(0);
callDetails.signOut = args.getBoolean(1);

..
and
exec(callback, null, 'ChromeIdentity', 'removeCachedAuthToken', [details.token, details.signOut]);

I am going to test details.signOut..
Please add a line in your doc about it.. as the chrome doc don't mentioned it.
https://developer.chrome.com/apps/identity#method-removeCachedAuthToken

Cheers!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant