Unable to add multiple Webauthn keys in the same settings flow
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 178
- Forks
- 96
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- This issue affects my Ory Cloud project.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Describe the bug
In the SelfServiceSettingsFlow, it is only possible to add a webauthn key once in the same settings flow. If after submitting the first key, the same settings flow is used add a new webauthn key, the error below is shown:
Error Status: Internal Server Error (500)
Reason: Expected WebAuthN in internal context to be an object.
Message: An internal server error occurred, please contact the system administrator
Request: 71cf8e4c-ecf1-9332-b598-5207ab28c5aa
While browsing for a solution on the online ory custom ui implementation and the ory console, it was possible to see that the later actually creates a new settings flow after adding each webauthn key. This is the workaround we are currently using.
Furthermore, while trying to replace the problem in the online ory custom ui implementation, the following error is shown:
Could not find any login identifiers. Did you forget to set them? This could also be caused by a server misconfiguration.
But it is probably due to a missing configuration in the identity schema (although in our custom implementation it works).
Please advise.
Reproducing the bug
Simple try to use the same SelfServiceSettingsFlow to add more than one webauthn keys. Only the first submit works.
Relevant log output
No response
Relevant configuration
No response
Version
0.0.1-alpha.169
On which operating system are you observing this issue?
Windows
In which environment are you deploying?
Docker Compose
Additional Context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the SelfServiceSettingsFlow and two WebAuthn keys using version 0.0.1-alpha.169, then inspect the SDK handling for settings-flow and WebAuthn submissions. Done means multiple keys can be added within one settings flow without the internal-context error; also verify that the reported login-identifier error is not part of the same failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, authentication, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100