question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How does one properly use SingleAccountPublicClientApplication.signOut()?

See original GitHub issue

Currently, we get an instance of SingleAccountPublicClientApplication via .createSingleAccountPublicClientApplication(context, R.raw.msal_config) and everything works fine when the app is in memory.

Let’s say the user swipes the app from memory. I would then create a new instance of SingleAccountPublicClientApplication, but this instance fails to sign out since there is no account associated to it. Do I need to call acquireToken() again so it can sign out? Is there a way to retrieve an instance of SingleAccountPublicClientApplication that knows if there is an account already?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
emmanocommented, Apr 30, 2020

Yes. At least signout() returns true now.

0reactions
emmanocommented, May 11, 2020

In the meantime I am using the following code to remove all user data and prevent automatic login after sign out. I am using “authorization_user_agent”: “WEBVIEW”.

(requireContext().getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager).clearApplicationUserData()

Read more comments on GitHub >

github_iconTop Results From Across the Web

SingleAccountPublicClientApplic...
Signs out the current the Account and Credentials (tokens). NOTE: If a device is marked as a shared device within broker signout will...
Read more >
SingleAccountPublicClientApplic...
public class SingleAccountPublicClientApplication extends PublicClientApplication implements ... public boolean signOut() throws MsalException, java.lang.
Read more >
How to call "SignOut" in Blazor Server with AzureAD and ...
1 Answer 1 ... You could use the Sign-out button like below, selecting the Sign out button in the web app triggers the...
Read more >
Log Users Out of Applications - Auth0
Describes how to force a user to log out of applications using the Auth0 logout ... this functionality you will have to handle...
Read more >
To single sign out or not to? - Honza's Blarg
The benefits are clear - users use a single account for all the ... Achieving single sign out from your application and Office...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found