mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 17:23:37 +00:00
Add support for requesting and using otp for verifying some requests (#527)
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
This commit is contained in:
@@ -243,6 +243,15 @@ export class TokenService implements TokenServiceAbstraction {
|
||||
return decoded.iss as string;
|
||||
}
|
||||
|
||||
getIsExternal(): boolean {
|
||||
const decoded = this.decodeToken();
|
||||
if (!Array.isArray(decoded.amr)) {
|
||||
throw new Error('No amr found');
|
||||
}
|
||||
|
||||
return decoded.amr.includes('external');
|
||||
}
|
||||
|
||||
private async storeTokenValue(key: string, value: string) {
|
||||
if (await this.skipTokenStorage()) {
|
||||
// if we have a vault timeout and the action is log out, don't store token
|
||||
|
||||
Reference in New Issue
Block a user