@arolariu/website / sites/arolariu.ro/src/lib/utils.server / verifyJwtToken
Function: verifyJwtToken()
verifyJwtToken(
token,secret):Promise<JwtVerificationResult>
Defined in: lib/utils.server.ts:228
Verifies and decodes a JWT token using the jose library. This function validates the signature, expiration, and not-before claims.
Parameters
token
string
The JWT token string to verify
secret
string
The secret key used to verify the token signature (base64 encoded)
Returns
Promise<JwtVerificationResult>
Promise resolving to verification result with decoded payload if valid, or error if invalid