Skip to content

Commit

Permalink
fix(authentication): Ensure authentication.entity configuration can b…
Browse files Browse the repository at this point in the history
…e null (#3136)
  • Loading branch information
psi-4ward committed Mar 31, 2023
1 parent 8c8560b commit c47349b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/typebox/src/default-schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import { Type, Static } from '@sinclair/typebox'

export const authenticationSettingsSchema = Type.Object({
secret: Type.String({ description: 'The JWT signing secret' }),
entity: Type.Optional(Type.String({ description: 'The name of the authentication entity (e.g. user)' })),
entity: Type.Optional(
Type.Union([
Type.String({ description: 'The name of the authentication entity (e.g. user)' }),
Type.Null()
])
),
entityId: Type.Optional(Type.String({ description: 'The name of the authentication entity id property' })),
service: Type.Optional(Type.String({ description: 'The path of the entity service' })),
authStrategies: Type.Array(Type.String(), {
Expand Down

0 comments on commit c47349b

Please sign in to comment.