mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
fix(schema): preserve WebAuthn payloads and align fixtures (#2710)
This commit is contained in:
1 parent
de1fd95a99
commit
adab646d1e
8 files changed
+193
-15
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import {schemaMetadata} from '@fluxer/schema/src/SchemaMetadata';
|
||||
import type {
|
||||
AuthenticationResponseJSON,
|
||||
PublicKeyCredentialRequestOptionsJSON,
|
||||
@@ -26,7 +27,7 @@ export const WebAuthnAuthenticationResponse = WebAuthnCredentialBase.extend({
|
||||
signature: z.string(),
|
||||
userHandle: z.string().optional(),
|
||||
}),
|
||||
}) satisfies z.ZodType<AuthenticationResponseJSON>;
|
||||
}).register(schemaMetadata, {preserveEmptyValues: true}) satisfies z.ZodType<AuthenticationResponseJSON>;
|
||||
|
||||
export const WebAuthnRegistrationResponse = WebAuthnCredentialBase.extend({
|
||||
response: z.looseObject({
|
||||
@@ -37,7 +38,7 @@ export const WebAuthnRegistrationResponse = WebAuthnCredentialBase.extend({
|
||||
publicKeyAlgorithm: z.number().int().optional(),
|
||||
publicKey: z.string().optional(),
|
||||
}),
|
||||
}) satisfies z.ZodType<RegistrationResponseJSON>;
|
||||
}).register(schemaMetadata, {preserveEmptyValues: true}) satisfies z.ZodType<RegistrationResponseJSON>;
|
||||
|
||||
export const WebAuthnAuthenticationOptions = z.looseObject({
|
||||
challenge: z.string(),
|
||||
|
||||
Reference in new issue
Block a user