mirror of
https://github.com/bitwarden/web
synced 2025-12-06 00:03:28 +00:00
Use v2 of 2fa.directory API (#849)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user