mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-10-09 03:09:04 +02:00
feat: add settings for limiting what passkeys can be used (#1662)
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
This commit is contained in:
co-authored by
Alessandro Segala
parent
448d271c94
commit
d6a47243db
@@ -122,6 +122,10 @@ func PasskeyUserVerificationRequired(cause error) *Error {
|
||||
return Wrap(cause, CodePasskeyUserVerificationRequired, http.StatusBadRequest, "Your passkey couldn't verify you. If you're using a security key, configure a FIDO2 PIN and try again")
|
||||
}
|
||||
|
||||
func SyncedPasskeyNotAllowed() *Error {
|
||||
return New(CodeSyncedPasskeyNotAllowed, http.StatusBadRequest, "Synced passkeys are not allowed")
|
||||
}
|
||||
|
||||
func ReservedClaim(key string) *Error {
|
||||
return New(CodeReservedClaim, http.StatusBadRequest, fmt.Sprintf("Claim %s is reserved and can't be used", key)).
|
||||
WithDetail("key", key).
|
||||
|
||||
@@ -26,6 +26,7 @@ const (
|
||||
CodeInvalidWebAuthnResponse Code = "invalid_webauthn_response"
|
||||
CodeWebAuthnAuthenticationFailed Code = "webauthn_authentication_failed"
|
||||
CodePasskeyUserVerificationRequired Code = "passkey_user_verification_required"
|
||||
CodeSyncedPasskeyNotAllowed Code = "synced_passkey_not_allowed"
|
||||
CodeInvalidWebAuthnSession Code = "invalid_webauthn_session"
|
||||
CodeUserNotFound Code = "user_not_found"
|
||||
CodeUserDisabled Code = "user_disabled"
|
||||
|
||||
Reference in New Issue
Block a user