mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
u2f email send apis
This commit is contained in:
@@ -139,12 +139,6 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
}
|
||||
}
|
||||
|
||||
// Two Factor APIs
|
||||
|
||||
postTwoFactorEmail(request: TwoFactorEmailRequest): Promise<any> {
|
||||
return this.send('POST', '/two-factor/send-email-login', request, false, false);
|
||||
}
|
||||
|
||||
// Account APIs
|
||||
|
||||
async getProfile(): Promise<ProfileResponse> {
|
||||
@@ -283,7 +277,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return this.send('POST', '/organizations/' + organizationId + '/import', request, true, false);
|
||||
}
|
||||
|
||||
// Settings
|
||||
// Settings APIs
|
||||
|
||||
async getSettingsDomains(): Promise<DomainsResponse> {
|
||||
const r = await this.send('GET', '/settings/domains', null, true, true);
|
||||
@@ -295,7 +289,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return new DomainsResponse(r);
|
||||
}
|
||||
|
||||
// Two-factor
|
||||
// Two-factor APIs
|
||||
|
||||
async getTwoFactorProviders(): Promise<ListResponse<TwoFactorProviderResponse>> {
|
||||
const r = await this.send('GET', '/two-factor', null, true, true);
|
||||
@@ -367,6 +361,14 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return this.send('POST', '/two-factor/recover', request, false, false);
|
||||
}
|
||||
|
||||
postTwoFactorEmailSetup(request: TwoFactorEmailRequest): Promise<any> {
|
||||
return this.send('POST', '/two-factor/send-email', request, true, false);
|
||||
}
|
||||
|
||||
postTwoFactorEmail(request: TwoFactorEmailRequest): Promise<any> {
|
||||
return this.send('POST', '/two-factor/send-email-login', request, false, false);
|
||||
}
|
||||
|
||||
// Helpers
|
||||
|
||||
private async send(method: 'GET' | 'POST' | 'PUT' | 'DELETE', path: string, body: any,
|
||||
|
||||
Reference in New Issue
Block a user