Closed david-plugge closed 4 months ago
It was too early in the morning...
@david-plugge did you solve this? how did you that?
Simply use TextEncoder
const JWT_KEY = new TextEncoder().encode(env.MAGIC_LINK_TOKEN_SECRET);
await createJWT(
algorithm,
JWT_KEY,
{},
{
subject: email,
expiresIn: new TimeSpan(10, 'm')
}
);
Yes silly me, thanks :)
Is there a way to create a key from a random string for signing and verifying jwts using oslo? If not, how to do it?
My goal is to be able to specify a secret as an env variable that is used for handling jwts.