Page MenuHomePhabricator

Add API endpoint for creating a passkey
Closed, ResolvedPublic

Description

Currently WebAuthn has an api.php endpoint for getting registration info, but key creation is done through an onSubmit handler in WebAuthnAddKeyForm. In order to be able to create passkeys on other pages (which T410336 requires), we need there to be an api.php endpoint for creating a passkey.

This endpoint should be able to create both regular WebAuthn keys ("security keys") and passkeys. It should accept an optional name for the key if it's passed in, or automatically generate one if not (T410938).

Event Timeline

Change #1220389 had a related patch set uploaded (by Mmartorana; author: Mmartorana):

[mediawiki/extensions/WebAuthn@master] Refactor WebAuthn registration to use API endpoint

https://gerrit.wikimedia.org/r/1220389

Change #1223265 had a related patch set uploaded (by Catrope; author: Catrope):

[mediawiki/extensions/OATHAuth@master] AddPasskeyDialog: Use new WebAuthn API to create passkey

https://gerrit.wikimedia.org/r/1223265

Change #1220389 merged by jenkins-bot:

[mediawiki/extensions/WebAuthn@master] Refactor WebAuthn registration to use API endpoint

https://gerrit.wikimedia.org/r/1220389

Change #1223265 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@master] AddPasskeyDialog: Use new WebAuthn API to create passkey

https://gerrit.wikimedia.org/r/1223265