[GH-ISSUE #3066] Access to fetch at 'https://2fa.directory/api/v3/totp.json' has been blocked by CORS policy #1463

Closed
opened 2026-03-03 02:09:25 +03:00 by kerem · 4 comments
Owner

Originally created by @ob-tk on GitHub (Dec 29, 2022).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/3066

Subject of the issue

After update to 1.27.0 [Latest] the ability to check for enabled 2FA is broken.

In the Chrome browser console, the following information:
"Access to fetch at 'https://2fa.directory/api/v3/totp.json' from origin 'https://my.doma.in' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled."

In the Web Vault always "good news".

image

Deployment environment

  • vaultwarden version: 1.27.0 [Latest]
  • Install method: Docker image (vaultwarden/server:latest)

  • Clients used: web wault (Chrome/Firefox/Opera browsers)

  • Reverse proxy and version: nginx/1.23.2

  • MySQL/MariaDB or PostgreSQL version: sqlite3

  • Other relevant details:

Steps to reproduce

Expected behaviour

Actual behaviour

Troubleshooting data

Originally created by @ob-tk on GitHub (Dec 29, 2022). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/3066 <!-- # ### NOTE: Please update to the latest version of vaultwarden before reporting an issue! This saves you and us a lot of time and troubleshooting. See: * https://github.com/dani-garcia/vaultwarden/issues/1180 * https://github.com/dani-garcia/vaultwarden/wiki/Updating-the-vaultwarden-image # ### --> <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unnecessary for your issue, feel free to remove them. Remember to hide/redact personal or confidential information, such as passwords, IP addresses, and DNS names as appropriate. --> ### Subject of the issue <!-- Describe your issue here. --> After update to **1.27.0 [Latest]** the ability to check for enabled 2FA is broken. In the Chrome browser console, the following information: "Access to fetch at 'https://2fa.directory/api/v3/totp.json' from origin 'https://my.doma.in' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled." In the Web Vault always "**good news**". ![image](https://user-images.githubusercontent.com/17561825/209979702-e38be947-d063-4408-9e4c-bd264b9fafe4.png) ### Deployment environment <!-- ========================================================================================= Preferably, use the `Generate Support String` button on the admin page's Diagnostics tab. That will auto-generate most of the info requested in this section. ========================================================================================= --> <!-- The version number, obtained from the logs (at startup) or the admin diagnostics page --> <!-- This is NOT the version number shown on the web vault, which is versioned separately from vaultwarden --> <!-- Remember to check if your issue exists on the latest version first! --> * vaultwarden version: **1.27.0 [Latest]** <!-- How the server was installed: Docker image, OS package, built from source, etc. --> * Install method: **Docker image** (vaultwarden/server:latest) * Clients used: <!-- web vault, desktop, Android, iOS, etc. (if applicable) --> **web wault** (Chrome/Firefox/Opera browsers) * Reverse proxy and version: <!-- if applicable --> **nginx**/1.23.2 * MySQL/MariaDB or PostgreSQL version: <!-- if applicable --> **sqlite3** * Other relevant details: ### Steps to reproduce <!-- Tell us how to reproduce this issue. What parameters did you set (differently from the defaults) and how did you start vaultwarden? --> ### Expected behaviour <!-- Tell us what you expected to happen --> ### Actual behaviour <!-- Tell us what actually happened --> ### Troubleshooting data <!-- Share any log files, screenshots, or other relevant troubleshooting data -->
kerem 2026-03-03 02:09:25 +03:00
Author
Owner

@BlackDex commented on GitHub (Dec 29, 2022):

Looks like 2fa.directory made some changes, and this also breaks on Bitwarden Self-Hosted environments.
That said, it's not something we can fix in this repo.

<!-- gh-comment-id:1367456997 --> @BlackDex commented on GitHub (Dec 29, 2022): Looks like 2fa.directory made some changes, and this also breaks on Bitwarden Self-Hosted environments. That said, it's not something we can fix in this repo.
Author
Owner

@ob-tk commented on GitHub (Dec 29, 2022):

Exactly.
Changed url from https://2fa.directory/api/v3/totp.json to https://api.2fa.directory/v3/totp.json
Waiting for changes from Bitwarden.

<!-- gh-comment-id:1367462191 --> @ob-tk commented on GitHub (Dec 29, 2022): Exactly. Changed url from https://2fa.directory/api/v3/totp.json to https://api.2fa.directory/v3/totp.json Waiting for changes from Bitwarden.
Author
Owner

@BlackDex commented on GitHub (Dec 29, 2022):

I have created my first PR for Bitwarden:

Lets wait and see :).

<!-- gh-comment-id:1367470031 --> @BlackDex commented on GitHub (Dec 29, 2022): I have created my first PR for Bitwarden: - https://github.com/bitwarden/clients/pull/4345 - https://github.com/bitwarden/server/pull/2523 Lets wait and see :).
Author
Owner

@BlackDex commented on GitHub (Dec 29, 2022):

Ill leave it open for now until they have fixed it and we have updated the web-vault version to a fixed version.
In theory we could fix this our self via patches, but i rather wait for Bitwarden to release a new vault version.

<!-- gh-comment-id:1367473496 --> @BlackDex commented on GitHub (Dec 29, 2022): Ill leave it open for now until they have fixed it and we have updated the web-vault version to a fixed version. In theory we could fix this our self via patches, but i rather wait for Bitwarden to release a new vault version.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#1463
No description provided.