swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

Is it possible to do external logout when using OAuth?

Open MikaelElkiaer opened this issue 3 years ago • 7 comments

I am not sure if this is possible or not, but I am starting with support in case I've missed it.

OAuth works fairly well, I am able to sign in, and able to sign out - almost. While the local session is cleared, it does not - at least not by default - clear the external session. It is a common function of OIDC login to be able to do an external logout as well via the endsession endpoint (see https://openid.net/specs/openid-connect-session-1_0-17.html#OPMetadata).

So, is it possible to already configure this? - When clearing the local session to also end the session with the OIDC provider and be redirected back to the swagger with a now completely cleared session.

MikaelElkiaer avatar Dec 15 '21 13:12 MikaelElkiaer

same issue, any update on this?

dwadghane avatar Mar 10 '22 08:03 dwadghane

@dwadghane Still stuck on this.

MikaelElkiaer avatar Mar 10 '22 08:03 MikaelElkiaer

Yes, I have a similar issue, is there any solution for this issue?

dwadghane avatar Mar 10 '22 09:03 dwadghane

any updates ?

AmilkarDev avatar Apr 13 '22 12:04 AmilkarDev

This is the only other similar workaround i found here, but im not sure how am I able to retrieve the id_token_hint from the solution suggested?

takato1314 avatar May 18 '22 10:05 takato1314

Same here

Kraego avatar Sep 14 '23 14:09 Kraego

I have the same issue. FWIW what I ended up doing is add the prompt=select_account query parameter in the Authorization URL in my OAuth2 setup, i.e. https://login.microsoftonline.com/common/oauth2/v2.0/authorize?prompt=select_account.

This forces the user to select an account when logging in, which in turns allows multiple accounts to be used.

It does not log out the user on the identity provider, so it is not an actual fix -- but since it does log out the user from the application, it's a workaround for people who want to play with different users in Swagger.

snathanail avatar Jan 04 '24 20:01 snathanail