File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -64,14 +64,14 @@ class ClerkApiToken implements FPApiToken {
6464 }
6565
6666 // Extract issuer from JWT and use it if present, otherwise fall back to config
67- const [ , payloadB64 ] = token . split ( '.' ) ;
67+ const [ , payloadB64 ] = token . split ( "." ) ;
6868 if ( ! payloadB64 ) {
6969 throw new Error ( "Invalid JWT format - missing payload" ) ;
7070 }
71-
71+
7272 const payload = JSON . parse ( atob ( payloadB64 ) ) ;
7373 const issuer = payload . iss ;
74-
74+
7575 let jwksUrl : string ;
7676 if ( issuer && issuer . startsWith ( "https://" ) ) {
7777 // Use issuer from JWT (preferred)
@@ -95,7 +95,7 @@ class ClerkApiToken implements FPApiToken {
9595 signal : AbortSignal . timeout ( 5000 ) , // 5 second timeout
9696 } ) ,
9797 ) ;
98-
98+
9999 if ( rJwtKey . isOk ( ) && rJwtKey . Ok ( ) . ok ) {
100100 const rCt = await exception2Result ( async ( ) => {
101101 // Parse JWKS response
@@ -116,7 +116,7 @@ class ClerkApiToken implements FPApiToken {
116116 throw new Error ( `verifyJwt failed ${ rCt . Err ( ) } from ${ jwksUrl } ` ) ;
117117 }
118118 }
119-
119+
120120 throw new Error ( `Failed to fetch JWKS from ${ jwksUrl } ` ) ;
121121 } ) ;
122122 if ( rt . isErr ( ) ) {
You can’t perform that action at this time.
0 commit comments