mirror of
https://github.com/bitwarden/web
synced 2026-01-08 03:23:29 +00:00
Update jslib and use new UserVerificationService pattern (#1302)
* Use try/catch pattern for userVerification * Update deps
This commit is contained in:
@@ -32,10 +32,9 @@ export class ApiKeyComponent {
|
||||
constructor(private userVerificationService: UserVerificationService, private logService: LogService) { }
|
||||
|
||||
async submit() {
|
||||
const request = await this.userVerificationService.buildRequest(this.masterPassword);
|
||||
|
||||
try {
|
||||
this.formPromise = this.postKey(this.entityId, request);
|
||||
this.formPromise = this.userVerificationService.buildRequest(this.masterPassword)
|
||||
.then(request => this.postKey(this.entityId, request));
|
||||
const response = await this.formPromise;
|
||||
this.clientSecret = response.apiKey;
|
||||
this.clientId = `${this.keyType}.${this.entityId}`;
|
||||
|
||||
Reference in New Issue
Block a user