Skip to content

Commit

Permalink
fix(#529): correct realm extraction logic
Browse files Browse the repository at this point in the history
Fixes #529
  • Loading branch information
sanjayankur31 committed Jun 30, 2022
1 parent d2e2cb1 commit 66df90b
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 66df90b

Please sign in to comment.