-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logout Route #46
Comments
I'm experiencing a similar problem when logging in with Keycloak |
@hyudoo Did you find a solution ? |
i created a middleware that will redirect when i hit the /admin/auth/login to logout url in keycloak: // src\middlewares\admin-redirect.js
module.exports = (_config, { strapi }) => {
const redirects = [
{
method: 'GET',
path: '/admin/auth/login',
handler: (ctx) => ctx.redirect("http://localhost:8080/realms/strapi/protocol/openid-connect/logout?post_logout_redirect_uri=http://localhost:1337/strapi-plugin-sso/oidc/&client_id=strapicli")
,
config: { auth: false },
}
]
strapi.server.routes(redirects);
};
i kind of wished there would be a /admin/auth/logout so i could map a redirect for the login and logout separately like so:
But unfortunately i couldn't find a way to change the logout button URL, |
It's good to use such a package but it's will be better if you add the implementing a logout route by modifying the controllers and adding a handler for logout because the issue that we faced that when for example launch the login for cognito we have the admin page of strapi but when logout, and the second time we login with cognito it redirect directly to strapi admin page, it's normal since we don't launch the logout from cognito
The text was updated successfully, but these errors were encountered: