Hello! I'd like to verify the user JWT from payload (passed as a GET query param from the preview url) in NextJS but it seems like it is failing every time. I currently have the following code to verify using "jose".
import { jwtVerify } from "jose"
await jwtVerify(token, new TextEncoder().encode("my_secret_token"))
I would look into the decode method of the jsonwebtoken library
Hi @hayskapoy - I'm not familiar with the jose package, have you tried using the local or REST API to verify the user JWT?
hey @hayskapoy I just answered this same idea of a question here:
https://discord.com/channels/967097582721572934/1085546333722660966
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.