ory / ory/sdk

Unable to add multiple Webauthn keys in the same settings flow

Open
#170 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
178
Forks
96
Avg merge
6d 23h
Merged PRs (30d)
3

Description

Preflight checklist
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.