Skip to content
Snippets Groups Projects
Commit afc28f75 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Handle keycloak redirects with an existing routing hash

The keycloack token doesn't have to be the first thing in the hash
so don't assume it starts with a #
parent 92c4704e
No related branches found
No related tags found
No related merge requests found
...@@ -68,7 +68,7 @@ class VPUAuth extends LitElement { ...@@ -68,7 +68,7 @@ class VPUAuth extends LitElement {
} }
// load Keycloak if we want to force the login or if we were redirected from the Keycloak login page // load Keycloak if we want to force the login or if we were redirected from the Keycloak login page
if (this.forceLogin || (href.indexOf('#state=') > 0 && href.indexOf('&session_state=') > 0)) { if (this.forceLogin || (href.search('[&#]state=') >= 0 && href.search('[&#]session_state=') >= 0)) {
this.loadKeycloak(); this.loadKeycloak();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment