Fix 2fa auth and token format migration (#13523)
Fix the 2FA setup and also make some changes so that the transition towards a new token format introduced in a previous PR happens more smoothly
This commit is contained in:
@@ -105,13 +105,13 @@ export class ApolloFactory<TCacheShape> implements ApolloManager<TCacheShape> {
|
||||
};
|
||||
}
|
||||
|
||||
const token = tokenPair.accessOrWorkspaceAgnosticToken?.token;
|
||||
|
||||
return {
|
||||
headers: {
|
||||
...headers,
|
||||
...options.headers,
|
||||
authorization: tokenPair.accessOrWorkspaceAgnosticToken.token
|
||||
? `Bearer ${tokenPair.accessOrWorkspaceAgnosticToken.token}`
|
||||
: '',
|
||||
authorization: token ? `Bearer ${token}` : '',
|
||||
...(this.currentWorkspaceMember?.locale
|
||||
? { 'x-locale': this.currentWorkspaceMember.locale }
|
||||
: { 'x-locale': i18n.locale }),
|
||||
|
||||
Reference in New Issue
Block a user