mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
Generalize token refreshing to include reauth by api key (#456)
This commit is contained in:
@@ -280,7 +280,7 @@ export class AuthService implements AuthServiceAbstraction {
|
||||
|
||||
let emailPassword: string[] = [];
|
||||
let codeCodeVerifier: string[] = [];
|
||||
let clientIdClientSecret: string[] = [];
|
||||
let clientIdClientSecret: [string, string] = [null, null];
|
||||
|
||||
if (email != null && hashedPassword != null) {
|
||||
emailPassword = [email, hashedPassword];
|
||||
@@ -344,7 +344,7 @@ export class AuthService implements AuthServiceAbstraction {
|
||||
await this.tokenService.setTwoFactorToken(tokenResponse.twoFactorToken, email);
|
||||
}
|
||||
|
||||
await this.tokenService.setTokens(tokenResponse.accessToken, tokenResponse.refreshToken);
|
||||
await this.tokenService.setTokens(tokenResponse.accessToken, tokenResponse.refreshToken, clientIdClientSecret);
|
||||
await this.userService.setInformation(this.tokenService.getUserId(), this.tokenService.getEmail(),
|
||||
tokenResponse.kdf, tokenResponse.kdfIterations);
|
||||
if (this.setCryptoKeys) {
|
||||
|
||||
Reference in New Issue
Block a user