Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebAuth disabled cannot set devices anymore #191

Closed
XsniferX opened this issue May 8, 2023 · 11 comments
Closed

WebAuth disabled cannot set devices anymore #191

XsniferX opened this issue May 8, 2023 · 11 comments
Labels
setup Runtime environment or usage issue

Comments

@XsniferX
Copy link

XsniferX commented May 8, 2023

Describe the bug

i was running v3.xx in docker (on unraid) i had multiple webauth devices setted up.

since the upgrade to v4 all my devices are lost and cannot add them back.

i can only log in with email + passwd

Additional context

{message: "Attestation Error: Relying Party ID not scoped to current.",…}
errors
:
{attestation: ["Attestation Error: Relying Party ID not scoped to current."]}
attestation
:
["Attestation Error: Relying Party ID not scoped to current."]
message
:
"Attestation Error: Relying Party ID not scoped to current."


Request URL:
https://chris.2fa.axxh.com/webauthn/register
Request Method:
POST
Status Code:
422
Remote Address:
[2a0x:f480:1x00:aff:5x0a:3xce:6xf:51x8]:443
Referrer Policy:
strict-origin-when-cross-origin

@Bubka
Copy link
Owner

Bubka commented May 9, 2023

Hi,

How is set the WEBAUTHN_ID var in your .env file?
It should be set according to https://webauthn-doc.spomky-labs.com/prerequisites/the-relying-party#how-to-determine-the-relying-party-id

@XsniferX
Copy link
Author

Hi, previously the variable was not set. so i just added. but now istead of getting back to register another webauth device now i have a error.

my site is accessible behind a reverse proxy (nginx proxy manager) is accesible at : john.2fa.exemple.com so i now set my WEBAUTHN_ID is set as "john.2fa.exemple.com"

2023-05-10 08_19_01-SRV-NAS-01_UpdateContainer and 47 more pages - Work - Microsoft​ Edge
2023-05-10 08_27_45-WebAuthn devices — Mozilla Firefox
2023-05-10 08_29_41-Error — Mozilla Firefox

@Bubka
Copy link
Owner

Bubka commented May 10, 2023

Please prefix WEBAUTHN_ID with https:// to have https://john.2fa.exemple.com

@XsniferX
Copy link
Author

XsniferX commented May 10, 2023

i tried to set it as 'https://john.2fa.exemple.com' and 'http://john.2fa.exemple.com' but i have now a error message i also have those error can they be related to the issue ?

also a image of my npm settings.

2023-05-10 09_42_52-WebAuthn devices and 28 more pages - Work - Microsoft​ Edge

2023-05-10 09_21_09-Error and 27 more pages - Work - Microsoft​ Edge

2023-05-10 09_22_59-CHRIS-LENOVO-PC (LAN) and 27 more pages - Work - Microsoft​ Edge

2023-05-10 09_23_15-CHRIS-LENOVO-PC (LAN) and 27 more pages - Work - Microsoft​ Edge

@Bubka
Copy link
Owner

Bubka commented May 10, 2023

Does your APP_URL var equals https://john.2fa.exemple.com/?

@XsniferX
Copy link
Author

yup

@XsniferX
Copy link
Author

XsniferX commented May 10, 2023

here the settings
but now with the error in red
2023-05-10 09_54_08-SRV-NAS-01_UpdateContainer and 28 more pages - Work - Microsoft​ Edge

@Bubka
Copy link
Owner

Bubka commented May 10, 2023

There is an issue with custom WEBAUTHN_ID values (I'm going to open an issue on the webauthn package repo) so for now please set it back to null. Like so it will be fallbacked to the value of APP_URL.

The Relying Party ID not scoped to current error is triggered when the domain of the running 2FAuth instance does not match the domain set in the WEBAUTHN_ID|APP_URL var.

Can you please confirm that you have all vars set up as:

In your env var declaration:
APP_URL=https://john.2fa.exemple.com
WEBAUTHN_ID=null // (beware, not empty or '', must be null)

The URL of your 2FAuth instance is https://john.2fa.exemple.com

@XsniferX
Copy link
Author

your are awesome !! with your last instruction it working now. i was able to register one key for the moment.

2023-05-10 14_45_16-WebAuthn devices and 30 more pages - Work - Microsoft​ Edge

@Bubka Bubka added the setup Runtime environment or usage issue label May 10, 2023
@ajatoledo
Copy link

@Bubka thanks for providing the workaround; worked to resolve my issue too. Thanks!

@Bubka
Copy link
Owner

Bubka commented Aug 25, 2023

There is an issue with custom WEBAUTHN_ID values (I'm going to open an issue on the webauthn package repo)

For the record: Laragear/WebAuthn#50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
setup Runtime environment or usage issue
Projects
None yet
Development

No branches or pull requests

3 participants