mirror of
https://github.com/bitwarden/web
synced 2025-12-15 07:43:16 +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) {
|
if (this.services.size > 0) {
|
||||||
return;
|
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) {
|
if (response.status !== 200) {
|
||||||
throw new Error();
|
throw new Error();
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,7 @@ export class InactiveTwoFactorReportComponent extends CipherReportComponent impl
|
|||||||
for (const serviceName in category) {
|
for (const serviceName in category) {
|
||||||
if (category.hasOwnProperty(serviceName)) {
|
if (category.hasOwnProperty(serviceName)) {
|
||||||
const service = category[serviceName];
|
const service = category[serviceName];
|
||||||
if (service.tfa && service.software && service.url != null) {
|
if (service.url != null) {
|
||||||
const hostname = Utils.getHostname(service.url);
|
const hostname = Utils.getHostname(service.url);
|
||||||
if (hostname != null) {
|
if (hostname != null) {
|
||||||
this.services.set(hostname, service.doc);
|
this.services.set(hostname, service.doc);
|
||||||
|
|||||||
Reference in New Issue
Block a user