diff options
author | Sebastian <sebasjm@gmail.com> | 2024-03-27 01:05:10 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-03-27 01:05:10 -0300 |
commit | 237c4e8adae997e84f5fb7a8fe5c03b1148e99dc (patch) | |
tree | 26ec2b1a82e730af080aae4625b736aaa77dfec7 /packages/merchant-backoffice-ui/src/context/session.ts | |
parent | ecb8c2078ebe94d81a6e03ebfe01ecdde53109e2 (diff) | |
download | wallet-core-237c4e8adae997e84f5fb7a8fe5c03b1148e99dc.tar.gz wallet-core-237c4e8adae997e84f5fb7a8fe5c03b1148e99dc.tar.bz2 wallet-core-237c4e8adae997e84f5fb7a8fe5c03b1148e99dc.zip |
wip #8655
Diffstat (limited to 'packages/merchant-backoffice-ui/src/context/session.ts')
-rw-r--r-- | packages/merchant-backoffice-ui/src/context/session.ts | 7 |
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(); |