mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
[PM-687] emergency access invite lost during sso (#5199)
* [PM-687] refactor observable in base accept component * [PM-687] add emergency access invitation to global state * [PM-687] save invite to state and check on login * [PM-687] move emergency access check above queryParams observable
This commit is contained in:
@@ -298,6 +298,8 @@ export abstract class StateService<T extends Account = Account> {
|
||||
setOpenAtLogin: (value: boolean, options?: StorageOptions) => Promise<void>;
|
||||
getOrganizationInvitation: (options?: StorageOptions) => Promise<any>;
|
||||
setOrganizationInvitation: (value: any, options?: StorageOptions) => Promise<void>;
|
||||
getEmergencyAccessInvitation: (options?: StorageOptions) => Promise<any>;
|
||||
setEmergencyAccessInvitation: (value: any, options?: StorageOptions) => Promise<void>;
|
||||
/**
|
||||
* @deprecated Do not call this directly, use OrganizationService
|
||||
*/
|
||||
|
||||
@@ -8,6 +8,7 @@ export class GlobalState {
|
||||
installedVersion?: string;
|
||||
locale?: string;
|
||||
organizationInvitation?: any;
|
||||
emergencyAccessInvitation?: any;
|
||||
ssoCodeVerifier?: string;
|
||||
ssoOrganizationIdentifier?: string;
|
||||
ssoState?: string;
|
||||
|
||||
@@ -1911,6 +1911,23 @@ export class StateService<
|
||||
);
|
||||
}
|
||||
|
||||
async getEmergencyAccessInvitation(options?: StorageOptions): Promise<any> {
|
||||
return (
|
||||
await this.getGlobals(this.reconcileOptions(options, await this.defaultOnDiskOptions()))
|
||||
)?.emergencyAccessInvitation;
|
||||
}
|
||||
|
||||
async setEmergencyAccessInvitation(value: any, options?: StorageOptions): Promise<void> {
|
||||
const globals = await this.getGlobals(
|
||||
this.reconcileOptions(options, await this.defaultOnDiskOptions())
|
||||
);
|
||||
globals.emergencyAccessInvitation = value;
|
||||
await this.saveGlobals(
|
||||
globals,
|
||||
this.reconcileOptions(options, await this.defaultOnDiskOptions())
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Do not call this directly, use OrganizationService
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user