1
0
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:
Jens Spanier 2021-02-25 17:25:48 +01:00 committed by GitHub
parent 6ad930c609
commit 4ebbefa181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);