When I go to my_website.com/auth/realms/my_realm/account it opens the account management page even if the user is not logged in. I want to redirect any request to the login page of the realm. I want to apply the same scenario when the user logs out. In other words, if the user isn’t logged in redirect them to the login page. How can I achieve that in keycloak?
I was not able to reproduce the described behaviour.
I am always automatically redirected to the login page if i try to access …/account/ while logged out.
Disclaimer: I am no keycloak expert.
Thanks for your reply.
Can you apply the following themes and test again:
Login Theme: keycloak
Account Theme: keycloak.v2
Account Console Theme: keycloak
Indeed, this triggers the error you described.
But i cannot do more than to confirm the error case. This is something for someone with more keycloak knowledge.
The new account theme
keycloak.v2 does go to an un-authenticated account management page. If you want it to automatically redirect to the login (as the old account theme did), you’ll probably have to build a custom theme based on
keycloak.v2 that does the redirect when there is no user authenticated.