Skip to content

Commit

Permalink
fix: correct message validation
Browse files Browse the repository at this point in the history
  • Loading branch information
aj-may committed Jan 4, 2023
1 parent 15f5367 commit cae66c8
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,8 @@ declare module "iron-session" {
}
}

const siweMessageSchema = z.object({
domain: z.string(),
address: z.string(),
statement: z.string().optional(),
uri: z.string(),
version: z.string(),
chainId: z.number(),
nonce: z.string(),
issuedAt: z.string().optional(),
expirationTime: z.string().optional(),
notBefore: z.string().optional(),
requestId: z.string().optional(),
resources: z.array(z.string()),
});

export const signInRequestSchema = z.object({
message: siweMessageSchema,
message: z.string(),
signature: z.string(),
});

Expand Down

0 comments on commit cae66c8

Please sign in to comment.