Skip to content

Passkeys endpoints

MethodRessourcesPurpose
GET/webauthn/passkeys/:idGet a passkey info.
DELETE/webauthn/passkeys/:idRevoke a passkey.

GET /webauthn/passkeys/:id

Returns a Passkey info identified by its id.

Request

ParamTypeMandatoryDescription
:idPathYesrepresents the unique identifier for a passkey

Response

interface Passkey {
alg: string; // The passkey algorithm (ex: P-256)
created_at: number; // the unix time when this passkey has been created
last_use: number; // the unix time when this passkey has been used
created_with: string[]; // a list of authentication methods used to generate this passkey
}

Response Codes

CodeDescription
200You did great.
404This passkey doesn’t exist or has been already revoked.

Usage

const response = await fetch(`https://api.nopwd.io/v0/webauthn/passkeys/${id}`);
const jwk = await response.json();

DELETE /webauthn/passkeys/:id

Revoke a Passkey by its id.

Request

ParamTypeMandatoryDescription
:idPathYesrepresents the unique identifier for a passkey

Response Codes

CodeDescription
200You did great.
404This passkey doesn’t exist or has been already revoked.

Usage

await fetch(`https://api.nopwd.io/v0/webauthn/passkeys/${id}`, {
method: "DELETE",
});