Conclui o login com a passkey como segundo passo
POST/api/auth/login/two-factor/passkey
- Auth
- Öffentlich
- API-Schlüssel:
- Kein API-Schlüssel möglich
- X-CommunityId
X-CommunityIdSende die X-CommunityId der Community, in der die Operation stattfindet.
Die Beschreibungen der Endpoints stammen aus der API-Spezifikation und sind vorerst auf Portugiesisch. Die Oberfläche drumherum ist übersetzt.
Como `POST /api/auth/login/two-factor`, mas com a passkey no lugar do código: `challengeId` do login e, em `response`, o que `startAuthentication` devolveu. A resposta é a do login, mais `via: passkey` e `deviceToken` quando `rememberDevice: true`. Uma passkey que não confere gasta uma tentativa do desafio do login (10 no total). Erros como em `POST /api/auth/passkeys/authentication/verify`. Público; 60 chamadas por IP em 15 minutos (429).
Header
| Name | Typ | Beschreibung |
|---|---|---|
X-CommunityIdoptional | string (uuid) | ID da comunidade em que a operação acontece. Obrigatório na maioria dos endpoints com escopo de comunidade. |
Request-Body application/json
| Name | Typ | Beschreibung |
|---|---|---|
challengeIdPflicht | string | |
responsePflicht | object | O objeto que `startRegistration` ou `startAuthentication` devolve, sem alterar. |
rememberDeviceoptional | boolean |
Antworten
| Status | Beschreibung |
|---|---|
200 | Login concluído (mesma forma do `POST /api/auth/login/two-factor`). |
400 | Requisição inválida — falha de validação. |
401 | Passkey não reconhecida para esta conta. |
429 | Tentativas demais. O header `Retry-After` diz em quantos segundos tentar de novo. |
curl-Beispiel
curl -X POST "https://api.memberfy.net/api/auth/login/two-factor/passkey" \
-H "X-CommunityId: $COMMUNITY_ID" \
-H "Content-Type: application/json" \
-d '{"challengeId":"string","response":{"id":"q3V0bWJmZXhhbXBsZS1jcmVk","rawId":"q3V0bWJmZXhhbXBsZS1jcmVk","type":"public-key","response":{"clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uZ2V0In0","authenticatorData":"SZYN5YgOjGh0NBcPZHZgW4_krrmihjLHmVzzuoMdl2MFAAAAAQ","signature":"MEUCIQ","userHandle":"MmIwYzdkOWU"},"clientExtensionResults":{}}}'