Skip to content

Commit

Permalink
fix(ui): Fix reading token from session storage
Browse files Browse the repository at this point in the history
  • Loading branch information
cc-ju committed May 20, 2022
1 parent 80cbe57 commit e26cb77
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions services/ui/src/auth/getUser.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { User } from "oidc-client-ts";
import { oidc } from "./config/oidc";

export function getUser() {
const oidcStorage = sessionStorage.getItem(
"oidc.user:http://localhost:8080/auth/realms/habitcentric:ui"
);
const oidcStorage = sessionStorage.getItem(`oidc.user:${oidc.authority}:ui`);
if (!oidcStorage) {
return null;
}
Expand Down

0 comments on commit e26cb77

Please sign in to comment.