Create Secret

Generates a secure secret for the use in applications requiring one (e.g. JWT). It uses built in browser APIs

const array = new Uint8Array(32); crypto.getRandomValues(array); const secret = Array.from(array) .map((byte) => byte.toString(16).padStart(2, '0')) .join('');