AxaFrance / oidc-client

Light, Secure, Pure Javascript OIDC (Open ID Connect) Client. We provide also a REACT wrapper (compatible NextJS, etc.).
MIT License
570 stars 152 forks source link

logout is not calling end_session endpoint #1349

Open bhargavmullakuru opened 2 months ago

bhargavmullakuru commented 2 months ago

Issue and Steps to Reproduce

Hi @guillaume-chervet , i found a bug, logout is not working as it is not calling end_session end point. but my oidc server supports and returning the url. because of this, next time when i try to login it is trying to login with the previous credentials and getting bad request error while requesting the token.

Pls let me know anything i need to configure for this.. ?

Thanks in advance.

Versions

7.22.0

Screenshots

Screenshot 2024-04-13 120304

Expected

Actual

Additional Details

guillaume-chervet commented 2 months ago

Hi @bhargavmullakuru , thank you for your issue. What behavior do you when calling logout method? Do you retrieve idToken scope? Do you have an url set in you endpoint in you wellknowurl ?

https://github.com/AxaFrance/oidc-client/blob/c555370d34f1e3903a0eff19f42b4c6c3d5e2781/packages/oidc-client/src/logout.ts#L132

bhargavmullakuru commented 2 months ago

@guillaume-chervet . I have the end_session url in well-known. But it's not getting called on logout ()

bhargavmullakuru commented 2 months ago

I just want library to call session end point url to close the session and clear the logged in credentials. Currently the URL is not calling and session is getting reinitiating with previously logged in user when click on sign in button.

guillaume-chervet commented 2 months ago

Hi @bhargavmullakuru ,

Do you retrieve idToken scope? It is necessary for logout. Do you have more information that i can use to help you? What does look like your configuration?