File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -82,14 +82,21 @@ class AdminForthAuth implements IAdminForthAuth {
8282 username : string ,
8383 pk : string | null
8484 } ) {
85+ console . log ( "in days" , expireInDays ) ;
8586 const expiresIn : string = expireInDays ? `${ expireInDays } d` : ( process . env . ADMINFORTH_AUTH_EXPIRESIN || '24h' ) ;
87+ console . log ( "in string" , expiresIn ) ;
8688 // might be h,m,d in string
89+
8790 const expiresInSec = parseTimeToSeconds ( expiresIn ) ;
8891
92+ console . log ( "expiresInSec" , expiresInSec ) ;
93+
8994 const token = this . issueJWT ( { username, pk} , 'auth' , expiresIn ) ;
95+ console . log ( "token" , token ) ;
9096 const expiresCookieFormat = new Date ( Date . now ( ) + expiresInSec * 1000 ) . toUTCString ( ) ;
91-
97+ console . log ( "expiresCookieFormat" , expiresCookieFormat ) ;
9298 const brandSlug = this . adminforth . config . customization . brandNameSlug ;
99+ console . log ( "brandSlug" , brandSlug ) ;
93100 response . setHeader ( 'Set-Cookie' , `adminforth_${ brandSlug } _jwt=${ token } ; Path=${ this . adminforth . config . baseUrl || '/' } ; HttpOnly; SameSite=Strict; Expires=${ expiresCookieFormat } ` ) ;
94101 }
95102
You can’t perform that action at this time.
0 commit comments