import {randomBytes,hash} from 'node:crypto'; const token=randomBytes(32).toString('base64url'); console.log(JSON.stringify({token,tokenHash:hash('sha256',token)},null,2));