Go live
Your code doesn’t change: only the keys, the variables and the domain do. Here are just those changes, with your production data.
What changes
1. Validate your domain and use the Production keys
In the Dashboard, validate your domain. Then copy the Production data with Copy data for the guide and paste it into your data: it fills in the Production row.
2. Put the variables on your server
In production don’t use your computer’s .env: set them as environment variables on your server or platform. Generate a new SESSION_SECRET, different from the development one.
Set them in your server or platform (Docker, your hosting…), not in a file you upload with your code.
APP_URL=https://your-app.com
BLOCKAUTH_API_KEY=your_api_key
BLOCKAUTH_API_SECRET=<paste the API Secret from the Dashboard>
SESSION_SECRET=<generate one: openssl rand -hex 32>
Replace the API Secret placeholder with your API Secret, copied straight from the Dashboard. Never paste it on this site.
Replace the SESSION_SECRET placeholder with a random value generated on your computer: openssl rand -hex 32.
Replace your_api_key with your API Key, or fill in your data in the SDK Quickstart and it is filled in for you.
Replace https://your-app.com with your app URL, or fill in your data in the SDK Quickstart and it is filled in for you.
3. Use your domain over https
APP_URL is your validated domain on https, so the callback becomes http://localhost:5173/blockauth/callback and the session cookie is marked secure. If a proxy terminates https in front of your server, tell your framework to trust it (in Express, app.set('trust proxy', 1)).
4. Check the webhook, if you use it
In your production app in the Dashboard, the webhook path is the same, /blockauth/webhook, on your public domain.
5. Try it
Open http://localhost:5173/blockauth/login, sign in and check that you come back signed in.
Before you publish
Go over this before opening your app to your users:
- Your production app has its own validated domain and keys, and the site uses
https. - The
apiSecretis only in your server's environment. - The callback always checks the
state, and your app creates sessions only from the address returned by/api/auth/token. - The session cookie is
HttpOnly,SecureandSameSite=Lax.
With this, the integration is done. What follows under More options is optional: add it when your app needs it.

