1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

Auth/PM-8111 - LoginComponent Refactor Bug - Fix Extension SSO (#11699)

* PM-8111 - LoginComponent Refactor - I broke the browser SSO flow - fixing it as clientId doesn't persist unless it is in state qParam.

* PM-8111 - Fix DefaultLoginComponentService tests
This commit is contained in:
Jared Snider
2024-10-24 19:02:10 -04:00
committed by GitHub
parent 1fb1be56b3
commit 877d379f86
3 changed files with 14 additions and 4 deletions

View File

@@ -50,7 +50,12 @@ export class DefaultLoginComponentService implements LoginComponentService {
special: false,
};
const state = await this.passwordGenerationService.generatePassword(passwordOptions);
let state = await this.passwordGenerationService.generatePassword(passwordOptions);
if (clientId === "browser") {
// Need to persist the clientId in the state for the extension
state += ":clientId=browser";
}
const codeVerifier = await this.passwordGenerationService.generatePassword(passwordOptions);
const codeVerifierHash = await this.cryptoFunctionService.hash(codeVerifier, "sha256");