How to get session id given userid and access token
Hi,
I am using the NextAuth provider for Zitadel and wanted to implement a custom logout when a user is logged into Zitadel with multiple users. The
/oidc/v1/end_session
endpoint logs out all users, but I want to be able to logout only the current user used in the app. I was trying to do this by calling /v2beta/sessions/
with a DELETE, but I somehow cannot get the sessionid
to use in that call.
Help would be greatly appreciated!6 Replies
Just doing signOut on the Provider level deletes the cookies, but the user can just log in again after that
Hm @livio I guess we do not track sessions across these apis, right?
The docs seemed to indicate, that this is the way to go for it though
the end session endpoint does always logout all users.
and this is currently not compatible with our new session api.
if you want to use the session api, you will have to make the authentication as well trhough the session api
Ah oke so not using the oidc and etc
I see
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View