-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Fix: passkey login not working anymore #32623
Conversation
Yes, you will need to store the flags. This will break for everyone who doesn't have backup eligible authenticators. See here for more info: https://www.w3.org/TR/webauthn-3/#sctn-credential-backup |
Looking at the way you're using this we can probably simplify this with tooling from the go-webauthn side, the binary value of the flags is already available so you don't need to convert it, but we can add a convenience method to derive the flags when reconstructing the credential. Let me know if this is preferable? |
If there could be a simple and compatible (backward&forward) solution, it definitely helps a lot. Indeed as a library downstream, I think the fewer details the downstream knows, the more robust the system is. Thank you very much! |
Inspect the change in go-webauthn/webauthn#337 and see what you think. I still need to update the docs and will do that time permitting. It's worthwhile to note that I plan on releasing soon but have one other fix I'd like to merge first. It adds an additional field which you should just backup Also it's worth noting I personally recommend storing the credential attestation (field named You don't need to restore it each time, but it will allow you to validate the attestation at a later date if you decide to leverage metadata. I can also provide some fairly decent recommendations on how to handle this, though you can also expect that the recommendations will make their way into the library as well. |
That's correct. |
Thank you for your help, finally I think I somewhat could understand the details now. Now we have 2 commits:
I think we could resolve the problem now (the same behavior as webauthn 0.10), and leave the database migration to another PR (or if it doesn't really cause security problem, maybe we could just keep using the authenticator auth flags without really storing them?) |
@wxiaoguang Still can't use passkey to login to Gitea. Screen-2024-11-26-214951.mp4 |
Confirmed that 555577e "fixes" the problem. |
* giteaofficial/main: Introduce OrgList and add LoadTeams, optimaze Load teams for orgs (go-gitea#32543) Refactor markup render system (go-gitea#32645) Fix: passkey login not working anymore (go-gitea#32623) Refactor some frontend problems (go-gitea#32646) Bypass vitest bug (go-gitea#32647) Fix race condition in mermaid observer (go-gitea#32599) Improve oauth2 scope token handling (go-gitea#32633) Fixed Issue of Review Menu Shown Behind (go-gitea#32631) Add github compatible tarball download API endpoints (go-gitea#32572) Fix markup render regression and fix some tests (go-gitea#32640) Fix sqlite3 test (go-gitea#32622) Strict pagination check (go-gitea#32548)
The initial passkey support was add by " Add Passkey login support #31504 " (I haven't carefully looked into the details), @anbraten do you have some ideas? |
Thanks for your quick answer. The difference is on logging:
And on 2FA
Probably one solution would be to put userVerification to "preferred", at least for one sign-in (which is safer btw). It seems also it might cause some password managers to hide some keys. NB: changing the code did not work. However removing old passkey and putting new one with "preferred" works so maybe there was a glitch or |
Quick fix #32595, use authenticator auth flags to login