1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +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

@@ -6,11 +6,10 @@ window.addEventListener("load", () => {
const code = getQsParam("code");
const state = getQsParam("state");
const lastpass = getQsParam("lp");
const clientId = getQsParam("clientId");
if (lastpass === "1") {
initiateBrowserSso(code, state, true);
} else if (state != null && clientId == "browser") {
} else if (state != null && state.includes(":clientId=browser")) {
initiateBrowserSso(code, state, false);
} else {
window.location.href = window.location.origin + "/#/sso?code=" + code + "&state=" + state;