generatePasskeyRegistrationOptions
const url = 'https://gymgym.club/api/auth/passkey/generate-register-options?authenticatorAttachment=platform';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://gymgym.club/api/auth/passkey/generate-register-options?authenticatorAttachment=platform' \ --header 'Authorization: Bearer <token>'Generate registration options for a new passkey
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Type of authenticator to use for registration. “platform” for device-specific authenticators, “cross-platform” for authenticators that can be used across devices.
Optional custom name for the passkey. This can help identify the passkey when managing multiple credentials.
Optional context for passkey-first registration flows.
Responses
Section titled “Responses”Success
object
object
object
object
object
object
object
Examplegenerated
{ "challenge": "example", "rp": { "name": "example", "id": "example" }, "user": { "id": "example", "name": "example", "displayName": "example" }, "pubKeyCredParams": [ { "type": "example", "alg": 1 } ], "timeout": 1, "excludeCredentials": [ { "id": "example", "type": "example", "transports": [ "example" ] } ], "authenticatorSelection": { "authenticatorAttachment": "example", "requireResidentKey": true, "userVerification": "example" }, "attestation": "example", "extensions": {}}Bad Request. Usually due to missing parameters, or invalid parameters.
object
Examplegenerated
{ "message": "example"}Unauthorized. Due to missing or invalid authentication.
object
Examplegenerated
{ "message": "example"}Forbidden. You do not have permission to access this resource or to perform this action.
object
Examplegenerated
{ "message": "example"}Not Found. The requested resource was not found.
object
Examplegenerated
{ "message": "example"}Too Many Requests. You have exceeded the rate limit. Try again later.
object
Examplegenerated
{ "message": "example"}Internal Server Error. This is a problem with the server that you cannot fix.
object
Examplegenerated
{ "message": "example"}