nuxt-community / auth-module

Zero-boilerplate authentication support for Nuxt 2
https://auth.nuxtjs.org
MIT License
1.93k stars 924 forks source link

Support Federated Logout for oauth2 #1691

Open tokidoki11 opened 2 years ago

tokidoki11 commented 2 years ago

Is your feature request related to a problem? Please describe.

https://auth0.com/docs/authenticate/login/logout/log-users-out-of-idps

Logging out from auth0 there is an option to logout user out of identity provider by specifying federated

Describe the solution you'd like to see

Logout function to cater federated in its argument this.$nuxt.logout({ federated: true })

currently it only supports client_id and logoutRedirectURL via config https://github.com/nuxt-community/auth-module/blob/532b3d67eec098e9247902cf7b1086f6bd8f4e58/src/schemes/oauth2.ts#L311-L321

if the argument is not possible (since there core module may not support as for now) nuxt config settings is possible as well for my current usecase

Describe alternatives you've considered

overwriting endpoint logout for auth0 strategies as https://example.auth0.com/v2/logout?federated& logout URL will be problematic https://example.auth0.com/v2/logout?federated&?client_id=xxx&returnTo=xxx