mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
Use v2 of 2fa.directory API (#849)
This commit is contained in:
parent
6ad930c609
commit
4ebbefa181
@ -77,7 +77,7 @@ export class InactiveTwoFactorReportComponent extends CipherReportComponent impl
|
||||
if (this.services.size > 0) {
|
||||
return;
|
||||
}
|
||||
const response = await fetch(new Request('https://2fa.directory/api/v1/data.json'));
|
||||
const response = await fetch(new Request('https://2fa.directory/api/v2/totp.json'));
|
||||
if (response.status !== 200) {
|
||||
throw new Error();
|
||||
}
|
||||
@ -88,7 +88,7 @@ export class InactiveTwoFactorReportComponent extends CipherReportComponent impl
|
||||
for (const serviceName in category) {
|
||||
if (category.hasOwnProperty(serviceName)) {
|
||||
const service = category[serviceName];
|
||||
if (service.tfa && service.software && service.url != null) {
|
||||
if (service.url != null) {
|
||||
const hostname = Utils.getHostname(service.url);
|
||||
if (hostname != null) {
|
||||
this.services.set(hostname, service.doc);
|
||||
|
Loading…
Reference in New Issue
Block a user