Skip to content

Commit

Permalink
Merge pull request #531 from OpenSourceBrain/fix/529
Browse files Browse the repository at this point in the history
fix(#529): correct realm extraction logic
  • Loading branch information
filippomc authored Jun 30, 2022
2 parents 6120ac4 + 66df90b commit ae8085e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions applications/backoffice/src/pages/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,13 @@ export default (props: any) => {

const getKeyCloakProfile = () => {
const hostname = window.location.hostname;
let realm = ""
if (hostname.indexOf("local") !== -1) {
let realm = "osbv2"
if (hostname.includes("local")) {
realm = "osblocal"
}
else if (hostname.indexOf("dev")) {
else if (hostname.includes("dev")) {
realm = "osb2dev"
}
else {
realm = "osb2"
}
return "/auth/admin/master/console/#/realms/" + realm + "/users/";
}

Expand Down

0 comments on commit ae8085e

Please sign in to comment.