-
Notifications
You must be signed in to change notification settings - Fork 22
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
Custom logout page not routed as the documentation states #91
Comments
I'm not sure why you get 404 but as I have understood the documentation you should set globalMiddlewareEnabled to false if you want to make custom login and logout pages. If globalMiddlewareEnabled is set to true /auth/logout will be redirected to /auth/zitadel/logout since you have made zitadel the defaultProvider. |
@tomfri But I want to have globalMiddlewareEnabled for all routes. Login works when placed like in the picture above but logout does not. As a workaround I created a subfolder called zitadel and moved my logout.vue inside of it. If I also move the login.vue then login gets the similar error... there are some inconsistencies here... I really don't want to have a file structure looking like: |
@arajkovic22 @tomfri I am experiencing the exact same inconsistent behavior with the The docs don't mention anything about setting globalMiddlewareEnabled to false in order to use custom login and logout pages. According to the docs: If you set customLoginPage to true, you have to manually add a login page to your Nuxt app under /auth/login. You can use the login method from the useOidcAuth composable to redirect the user to the respective provider login page. Setting customLoginPage to true will also disable the /auth/logout route. You have to manually add a logout page to your Nuxt app under /auth/logout and use the logout method from the useOidcAuth composable to logout the user or make sure that you always provide the optional provider parameter to the logout method." I've added the If I type the I'm assuming the custom logout page is meant to behave as the custom login does. If the custom logout route being intercepted and redirected to Hopefully the info I've provided helps to pin down the issue or verify if this is the intended behavior. |
I'm seeing this as well with a defaultProvider selected and no global middleware enabled. I've noticed that if you refresh though, it ends up redirecting you to the IDP login page. |
Hi everybody, I am trying to create a custom logout page and navigate to it but for some reason path in navigateTo is getting transformed.
On the upper picture is my file structure.
This is how I am trying to navigate on my index page:
<Button @click="navigateTo('/auth/logout')">LOGOUT
And I get error 404...
And this is oidc part of my nuxt config
oidc: { defaultProvider: 'zitadel', providers: { zitadel: { clientId: '', baseUrl: '', redirectUri: '', clientSecret: '', } }, middleware: { globalMiddlewareEnabled: true, customLoginPage: true, } }
Is this a known issue or am I missing something?
The text was updated successfully, but these errors were encountered: