mirror of
https://github.com/bitwarden/browser
synced 2026-02-08 20:50:28 +00:00
show key connector domain for new sso users
This commit is contained in:
@@ -27,8 +27,10 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||
import { UserId } from "@bitwarden/common/types/guid";
|
||||
import { ToastService } from "@bitwarden/components";
|
||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/generator-legacy";
|
||||
import { KdfType } from "@bitwarden/key-management";
|
||||
|
||||
@Directive()
|
||||
export class SsoComponent implements OnInit {
|
||||
@@ -219,6 +221,13 @@ export class SsoComponent implements OnInit {
|
||||
return await this.handleTwoFactorRequired(orgSsoIdentifier);
|
||||
}
|
||||
|
||||
if (authResult.requiresKeyConnectorDomainConfirmation != null) {
|
||||
return await this.handleKeyConnectorDomainConfirmation(
|
||||
authResult.requiresKeyConnectorDomainConfirmation,
|
||||
authResult.userId,
|
||||
);
|
||||
}
|
||||
|
||||
// Everything after the 2FA check is considered a successful login
|
||||
// Just have to figure out where to send the user
|
||||
|
||||
@@ -419,4 +428,22 @@ export class SsoComponent implements OnInit {
|
||||
const checkStateSplit = checkState.split("_identifier=");
|
||||
return stateSplit[0] === checkStateSplit[0];
|
||||
}
|
||||
|
||||
private async handleKeyConnectorDomainConfirmation(
|
||||
request: {
|
||||
kdf: KdfType;
|
||||
kdfIterations: number;
|
||||
kdfMemory?: number;
|
||||
kdfParallelism?: number;
|
||||
keyConnectorUrl: string;
|
||||
},
|
||||
userId: UserId,
|
||||
) {
|
||||
await this.router.navigate(["confirm-key-connector-domain"], {
|
||||
state: {
|
||||
...request,
|
||||
userId,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user