From 72bd80dfbe29420eb0aa820448886ae0618be21d Mon Sep 17 00:00:00 2001 From: Harish Kumar Date: Wed, 23 Oct 2024 15:54:20 +0530 Subject: [PATCH] fix: make ModuleOptions properties required --- src/runtime/types/ModuleOptions.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/runtime/types/ModuleOptions.ts b/src/runtime/types/ModuleOptions.ts index f8600a7..a79145b 100644 --- a/src/runtime/types/ModuleOptions.ts +++ b/src/runtime/types/ModuleOptions.ts @@ -10,7 +10,7 @@ export interface ModuleOptions { * The authentication mode. * @default 'cookie' */ - authMode?: 'cookie' | 'token'; + authMode: 'cookie' | 'token'; /** * The current application URL for the Referrer header. (Optional) @@ -38,7 +38,7 @@ export interface ModuleOptions { * The storage provider to use for the token. * @default 'cookie' */ - provider?: 'cookie' | 'localStorage'; + provider: 'cookie' | 'localStorage'; }; /** @@ -113,28 +113,28 @@ export interface ModuleOptions { * If set to false, a 403 error is triggered. * @default '/login' */ - loginPath: string | false; + loginPath: string; /** * URL to redirect to when guest access is required (user must not be authenticated). * If set to false, the plugin will throw an 403 error. * @default '/' */ - guestOnlyRedirect: string | false; + guestOnlyRedirect: string; /** * URL to redirect to after a successful login. * If set to false, no redirection occurs. * @default '/' */ - redirectToAfterLogin: string | false; + redirectToAfterLogin: string; /** * URL to redirect to after logout. * If set to false, no redirection occurs. * @default '/' */ - redirectToAfterLogout: string | false; + redirectToAfterLogout: string; }; middlewareNames: { @@ -163,5 +163,5 @@ export interface ModuleOptions { * * @default 3 */ - logLevel?: number; + logLevel: number; }