Closed xgp closed 2 years ago
Does this happen in a specific way? There are two "Logout" links and both follow this format
<Button variant="link" isInline onClick={() => keycloak.logout()}>
Logout
</Button>
which seems correct. It logs me out and I get redirected to the Log in page.
https://user-images.githubusercontent.com/244253/163942790-6ce5f044-e2f7-4868-8bc7-dc435fb4c9d0.mov
This was the report I got from Plotly. Happening from the dashboard page.
Since /dashboard
isn't actually a path the backend knows about, it returns a 404. Can we use the redirect_uri
option in the logout to send them to the root path (e.g. /auth/realms/<realm>/wizard
)?
https://www.keycloak.org/docs/latest/securing_apps/#logout-options
@xgp yeah I can pass through the location to send it to I believe. Thanks for that video, I assumed it was the setup once deployed that was throwing the issue.
Ok, there is also a way to generate a "logout url". So I tried that and made it an actual link. Let's see if that does the trick. /dashboard
shouldn't matter since that's only in the query param as a redirect after login.
Logout link needs to call
keycloak.logout()
and redirect to login (should be automatic)