Im facing an issue logging out users.
I’m using the iFrame integration on my site.
I use an admin account to get tokens for users to log them in, this way I do not need to deal with passwords.
- The iFrame API URL isn’t always called. So I cannot return an empty token to signify that the user is not logged in.(Probably cached.)
- I use the userId and the user auth_token and call the /api/v1/logout endpoint (vs using the admin token to log them out).
When I try to log out the user calling the end point, even thought I get a status success message, he is still logged into the server.
Maybe Im doing it wrong, but the flow via logs that I took seems to be correct. Everything seems to be working as it should, it’s just the user never actually gets logged out.
Side Note: If I’m able to log users in as an Admin via tokens, shouldn’t I be able to log them out as an Admin? I couldn’t find that endpoint if it exists. As of now I understand that I can get the user token as an Admin, but the user himself needs to logout.