You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im currently implementing a login system in deno using the djwt library (https://deno.land/x/[email protected]).
It wants me to generate a cryptokey like so:
When generating the jwt, the create function wants to have such a CryptoKey object instead of a string, like back in the days ( const jwt = await create({ alg: "HS512", typ: "JWT" }, payload, key);
).
How can I consistently safe that cryptokey, so it doesnt change on each restart of my deno app?
Because obviously if i want to verify the old sessions i also need the old key again...
Clad for any help I can get!
The text was updated successfully, but these errors were encountered:
you can use
const exportedKey = await crypto.subtle.exportKey("raw", key);
to export the key (base64 encode it to store it) and later use importKey to get it back.
Im currently implementing a login system in deno using the djwt library (https://deno.land/x/[email protected]).
It wants me to generate a cryptokey like so:
Problem is, I cant safe that key in my env variables. If I logout the value of the key it looks like that:
When generating the jwt, the create function wants to have such a CryptoKey object instead of a string, like back in the days (
const jwt = await create({ alg: "HS512", typ: "JWT" }, payload, key);
).
How can I consistently safe that cryptokey, so it doesnt change on each restart of my deno app?
Because obviously if i want to verify the old sessions i also need the old key again...
Clad for any help I can get!
The text was updated successfully, but these errors were encountered: