summaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/context/session.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/merchant-backoffice-ui/src/context/session.ts')
-rw-r--r--packages/merchant-backoffice-ui/src/context/session.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/merchant-backoffice-ui/src/context/session.ts b/packages/merchant-backoffice-ui/src/context/session.ts
index 83f3f113a..9d63d8e33 100644
--- a/packages/merchant-backoffice-ui/src/context/session.ts
+++ b/packages/merchant-backoffice-ui/src/context/session.ts
@@ -215,7 +215,8 @@ export function useSessionContext(): SessionStateHandler {
.href,
isAdmin: info.instance === DEFAULT_ADMIN_USERNAME,
instance: info.instance,
- token: info.token,
+ // FIXME: bank and merchant should have consistent behavior
+ token: info.token?.substring("secret-token:".length) as AccessToken,
impersonate: {
originalBackendUrl: state.backendUrl,
originalToken: state.token,
@@ -239,7 +240,9 @@ export function useSessionContext(): SessionStateHandler {
impersonate: undefined,
...state,
status: "loggedIn",
- token: info.token,
+ // FIXME: bank and merchant should have consistent behavior
+ token: info.token?.substring("secret-token:".length) as AccessToken,
+ // token: info.token,
};
update(nextState);
cleanAllCache();