Skip to content

Commit

Permalink
fix: [M3-7728] - Token issues when account switching (#10138)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjac0bs authored Feb 1, 2024
1 parent 6cf8490 commit 70b5242
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/manager/src/features/Account/SwitchAccountDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const SwitchAccountDrawer = (props: Props) => {
headers:
userType === 'proxy'
? {
Authorization: `Bearer ${token}`,
Authorization: token,
}
: undefined,
});
Expand Down Expand Up @@ -105,8 +105,8 @@ export const SwitchAccountDrawer = (props: Props) => {
// We don't need to worry about this if we're a proxy user.
if (!isProxyUser) {
const parentToken = {
expiry: getStorage('authenication/expire'),
scopes: getStorage('authenication/scopes'),
expiry: getStorage('authentication/expire'),
scopes: getStorage('authentication/scopes'),
token: currentTokenWithBearer ?? '',
};

Expand Down
2 changes: 1 addition & 1 deletion packages/manager/src/mocks/serverHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ export const handlers = [
const profile = profileFactory.build({
restricted: false,
// Parent/Child: switch the `user_type` depending on what account view you need to mock.
user_type: 'proxy',
user_type: 'parent',
});
return res(ctx.json(profile));
}),
Expand Down

0 comments on commit 70b5242

Please sign in to comment.