0

I am trying to end the session in my app so that I can log in with a new user.

Currently I have the functionality that logs the user out, and shows the log in screen. However when a new user tries to log in an error occurs saying that another user is logged in for this session.

I know that simply uninstalling the app will solve this, but I have not figured out how to manually clear and delete the data necessary to end the session without uninstalling.

I also get a little confused looking at the documentation, and I believe that a fix is being worked on, but it's not fully implemented yet.

Have anyone any suggestions on how to fix this? Or why the session gets forgotten after reinstall, and not by clearing the data in settings?

Tob237
  • 291
  • 1
  • 5
  • 15
  • this seems similar to this https://stackoverflow.com/questions/40778792/logout-in-appauth-android – PedroAGSantos Aug 18 '20 at 08:51
  • It's not a complete answer to the question, however I did find a way to log out. Running the "end session"-URL within a Chrome Custom Tab (which is also used for logging in) worked for logging the user out completely. – Tob237 Aug 21 '20 at 06:43

1 Answers1

2

You had the right approach:

  • call the end session endpoint in a CustomTab to clear the web cookies
  • remove any token cached in your app

There is nothing more to do.

Carl Sarkis
  • 119
  • 6