Skip to content

Commit

Permalink
refactor: keep origin customJwtFetcherGuard
Browse files Browse the repository at this point in the history
  • Loading branch information
darcyYe committed Mar 21, 2024
1 parent 45a7ee1 commit b2e00df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/schemas/src/types/jwt-customizer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { z } from 'zod';

import { Roles, UserSsoIdentities, Organizations } from '../db-entries/index.js';
import { mfaFactorsGuard } from '../foundations/index.js';
import { jsonObjectGuard, mfaFactorsGuard } from '../foundations/index.js';

import { jwtCustomizerGuard } from './logto-config/index.js';
import { scopeResponseGuard } from './scope.js';
Expand Down Expand Up @@ -41,8 +41,8 @@ export const customJwtFetcherGuard = jwtCustomizerGuard
.pick({ script: true, envVars: true })
.required({ script: true })
.extend({
token: z.record(z.unknown()),
context: z.record(z.unknown()).optional(),
token: jsonObjectGuard,
context: jsonObjectGuard.optional(),
});

export type CustomJwtFetcher = z.infer<typeof customJwtFetcherGuard>;
Expand Down

0 comments on commit b2e00df

Please sign in to comment.