File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' @clerk/clerk-sdk-node ' : patch
3+ ---
4+
5+ Load ` jwtKey ` from ` CLERK_JWT_KEY ` env variable
Original file line number Diff line number Diff line change @@ -30,10 +30,11 @@ export function Clerk(options: ClerkOptions) {
3030
3131const createBasePropForRedwoodCompatibility = ( ) => {
3232 const verifySessionToken = ( token : string ) => {
33+ const { jwtKey } = loadApiEnv ( ) ;
3334 const { payload } = decodeJwt ( token ) ;
3435 return _verifyToken ( token , {
3536 issuer : payload . iss ,
36- jwtKey : process . env . CLERK_JWT_KEY ,
37+ jwtKey,
3738 } ) ;
3839 } ;
3940 return { base : { verifySessionToken } } ;
Original file line number Diff line number Diff line change @@ -32,5 +32,6 @@ export const loadApiEnv = () => {
3232 proxyUrl : process . env . CLERK_PROXY_URL || '' ,
3333 signInUrl : process . env . CLERK_SIGN_IN_URL || '' ,
3434 isSatellite : process . env . CLERK_IS_SATELLITE === 'true' ,
35+ jwtKey : process . env . CLERK_JWT_KEY || '' ,
3536 } ;
3637} ;
You can’t perform that action at this time.
0 commit comments