Closed BayoKwendo closed 3 years ago
Deno 1.13.2 i can successfully generate token using web crypto api but token verification is always wrong. How can i store crypto key somewhere for verification purposes
await verify(jwt, KEY) .then(() => { console.log('valid'); }) .catch((e) => { console.log(e); });
I have figure out on how to go about this. Define your key globally
export const key = await crypto.subtle.generateKey({ name: 'HMAC', hash: 'SHA-512' }, true, [ 'verify', 'sign' ###])
Deno 1.13.2 i can successfully generate token using web crypto api but token verification is always wrong. How can i store crypto key somewhere for verification purposes
await verify(jwt, KEY) .then(() => { console.log('valid'); }) .catch((e) => { console.log(e); });