[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"tools-page-secret-key-generator\u002Fbetter-auth-secret":3},{"page":4,"related":72,"variants":91},{"path":5,"name":6,"title":7,"description":8,"checkedAt":9,"sources":10,"faq":20,"related":33,"nuxter":37,"body":40,"tool":70,"preset":71},"\u002Ftools\u002Fsecret-key-generator\u002Fbetter-auth-secret","BETTER_AUTH_SECRET","BETTER_AUTH_SECRET Generator","Generate a BETTER_AUTH_SECRET in your browser, 32 random bytes as base64 like openssl rand -base64 32, with the .env line and the wrangler command.","2026-10-06",[11,14,17],{"label":12,"url":13},"Better Auth docs, Installation","https:\u002F\u002Fwww.better-auth.com\u002Fdocs\u002Finstallation",{"label":15,"url":16},"Cloudflare Workers docs, Secrets","https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fconfiguration\u002Fsecrets\u002F",{"label":18,"url":19},"MDN, Crypto.getRandomValues()","https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FCrypto\u002FgetRandomValues",[21,24,27,30],{"question":22,"answer":23},"How long does BETTER_AUTH_SECRET need to be?","Better Auth asks for at least 32 characters, generated with high entropy. 32 random bytes in base64 make 44 characters.",{"question":25,"answer":26},"Is this the same as openssl rand -base64 32?","Yes. Both take 32 bytes from a cryptographic generator and write them as base64. This page uses the browser's crypto.getRandomValues instead of OpenSSL.",{"question":28,"answer":29},"Can I rotate BETTER_AUTH_SECRET?","Better Auth has a BETTER_AUTH_SECRETS option for rotation, so you can add a new secret without breaking what the old one signed. Read its docs before you rely on it.",{"question":31,"answer":32},"How do I set it on Cloudflare Workers?","Run npx wrangler secret put BETTER_AUTH_SECRET and paste the value at the prompt. For local development, put the .env line in .env or .dev.vars, not both.",[34,35,36],"nuxt-environment-variables","auth-pricing-calculator","webhook-signature-verifier",{"body":38,"to":39},"Nuxter uses nuxt-auth-utils rather than Better Auth, with email links, passwords, passkeys and social sign-in built in, so its one session secret is NUXT_SESSION_PASSWORD.","\u002Ffeatures",{"type":41,"value":42,"toc":64},"minimark",[43,48,52,56],[44,45,47],"h2",{"id":46},"what-better-auth-signs-with-it","What Better Auth signs with it",[49,50,51],"p",{},"Better Auth uses the secret to sign and encrypt what it hands the browser, such as session cookies. Anyone who has it can forge them, so keep it out of your repository and out of client code.",[44,53,55],{"id":54},"why-base64","Why base64",[49,57,58,59,63],{},"The Better Auth docs suggest ",[60,61,62],"code",{},"openssl rand -base64 32",", and this preset makes the same thing: 32 random bytes written as 44 base64 characters. Switch to base64url if the value has to go into a URL.",{"title":65,"searchDepth":66,"depth":66,"links":67},"",2,[68,69],{"id":46,"depth":66,"text":47},{"id":54,"depth":66,"text":55},"secret-key-generator","better-auth-secret",[73,79,85],{"path":74,"tool":34,"name":75,"title":76,"description":77,"summary":78,"checkedAt":9},"\u002Ftools\u002Fnuxt-environment-variables","Nuxt environment variables","Nuxt Environment Variables: runtimeConfig to NUXT_","Paste a nuxt.config to get the Nuxt environment variables that override each runtimeConfig key, the type each value arrives as and the names that collide.","Paste a nuxt.config and get the NUXT_ variable for every runtimeConfig key, the type it arrives as and the names that collide.",{"path":80,"tool":35,"name":81,"title":82,"description":83,"summary":84,"checkedAt":9},"\u002Ftools\u002Fauth-pricing-calculator","Auth pricing calculator","Auth0 Pricing Calculator: Compare Clerk and Firebase","An Auth0 pricing calculator that also prices Clerk, Firebase, Supabase, WorkOS, Cognito and Stytch at your monthly active users, with MFA and SSO.","What Auth0, Clerk, Firebase, Supabase, WorkOS, Cognito and Stytch charge at your monthly active users.",{"path":86,"tool":36,"name":87,"title":88,"description":89,"summary":90,"checkedAt":9},"\u002Ftools\u002Fwebhook-signature-verifier","Webhook signature verifier","Webhook Signature Verification for Stripe and Polar","Webhook signature verification in your browser for Stripe, Polar, Standard Webhooks, Lemon Squeezy, Creem, Paddle and GitHub, with the reason a check fails.","Check a Stripe, Polar, Lemon Squeezy, Creem, Paddle or GitHub signature in the browser, and see why it fails.",[92,95,96,99],{"path":93,"name":94},"\u002Ftools\u002Fsecret-key-generator","Secret key generator",{"path":5,"name":6},{"path":97,"name":98},"\u002Ftools\u002Fsecret-key-generator\u002Fjwt-secret","JWT secret",{"path":100,"name":101},"\u002Ftools\u002Fsecret-key-generator\u002Fnuxt-session-password","NUXT_SESSION_PASSWORD"]