Integration checklist
Go over it before calling your integration done, whichever guide you follow: the security rules it must keep, the example values to replace and how to check that it works.
Security rules
Your integration must keep all these rules. Each one is explained in the guides and in Security.
- The API Secret only lives in the backend. Read it from an environment variable or your secret store. Never put it in frontend code, in a
VITE_,NEXT_PUBLIC_orREACT_APP_variable, in Angular'senvironment.ts, in a committed file or in a log. The API Key is public and goes in the frontend. - The browser never decides who the user is. The widget only hands a one-time code to the backend. The backend redeems it at
POST /api/auth/tokenwith the API Secret (the Block-Auth packages do it for you) and only then creates its own session. Never trust a user or address sent by the browser. - With the Node.js package, the order matters. Mount
blockauthRouter(routes)aftersession(...)and beforeexpress.json(), and make the session cover/auth/blockauth, not only/api. - The widget calls
/auth/blockauthon the same origin as the page. In development, use your dev server's proxy. In production, serve the frontend from the backend or send/auth/blockauthto it with a reverse proxy, overhttps. Don't open CORS for it. - With the redirect login, check
statebefore redeeming the code. - Verify every webhook before trusting it: the Block-Auth packages do it, and the Webhooks page explains how to do it yourself.
- Use role slugs, not names. Role names can change; slugs never do.
- Don't let the session outlive
signedExpiredAt, the moment the user's signature for the app expires (how long a session lasts). - Frontend only (
authEndpoint: false) only shows who is signed in. There's no backend redeeming the code, so the rules about the backend and/auth/blockauthdon't apply to it, but no server has a session it can trust either. Never use the address the page knows to authorize anything on a server: if the app has an API or private data, follow React, Vue or Angular (+ backend).
Placeholders
The code in the docs uses these placeholders. Replace every one before finishing, and never with a made-up value:
| Placeholder | What to do |
|---|---|
sha256_hex_of_your_api_secretsha256_of_api_secret | Replace the sha256_… value with the SHA-256 hash (hex) of your API Secret. Compute it on your computer, never on a web page. |
your_api_secret<pega el API Secret del Dashboard><paste the API Secret from the Dashboard> | Replace the API Secret placeholder with your API Secret, copied straight from the Dashboard. Never paste it on this site. |
a_long_random_string<genera uno: openssl rand -hex 32><generate one: openssl rand -hex 32> | Replace the SESSION_SECRET placeholder with a random value generated on your computer: openssl rand -hex 32. |
your_api_key | Replace your_api_key with your API Key, or fill in your data in the SDK Quickstart and it is filled in for you. |
https://your-app.com | 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. |
your-app.com | Replace your-app.com with your domain, or fill in your data in the SDK Quickstart and it is filled in for you. |
https://example.com | Replace https://example.com with your app’s validated domain. |
https://your-site.com | Replace https://your-site.com with your WordPress site URL. |
acme-x7k2p9 | Replace acme-x7k2p9 with the slug of one of your roles: copy it from the Roles tab in the Dashboard, under the role name. |
"your-app": { | Replace your-app with your project name: the key you already have under projects in your angular.json. |
your_access_token | Replace your_access_token with the access token you get from /api/signin. It lasts 1 hour. |
your_refresh_token | Replace your_refresh_token with the refresh token you got from /api/signin. |
code_from_the_widgetcode_verifier_from_the_widgetredirect_uri_from_the_widget | Replace the …_from_the_widget values with the ones the widget sends to your /code route. |
code_from_your_callback | Replace code_from_your_callback with the code Block-Auth sends to your callback URL. |
"your-app" | Replace your-app with your project name in angular.json. |
findUsersaveSignoutlastSignoutremoveLinkendSessionsOfmarkUnlinkedalreadyProcessedisLinkedsaveLinklistOrdersdeleteOrder | findUser, saveSignout… are yours: replace them with your app’s own functions (your database, your cache…). |
Definition of done
The integration is done when the last Quickstart step, Go live, passes on your domain. Before that, the same check must pass in development:
- React, Vue or Angular: after signing in with the Block-Auth button,
GET /auth/blockauth/mein the same browser returns the user. A404or your app's page means the request doesn't reach the backend; a401means the login didn't create the session. See Connect and try it. - React, Vue or Angular, frontend only: after signing in with the Block-Auth button, it turns into the profile menu, and the user is still signed in after reloading the page. See Try it.
- PHP, Python, .NET, Node.js: opening
/blockauth/loginand signing in brings the user back signed in, andGET /api/mereturns them. See Login. - WordPress: after signing out, the Block-Auth button on
/wp-login.phpsigns the user in to WordPress. See Connect it.
Also check that the API Secret doesn't appear anywhere in the frontend build output or in the repository, and that the app's own lint and tests still pass.
For AI assistants
If an AI assistant (Claude Code, Cursor, Copilot, ChatGPT…) does the integration, give it the docs in Markdown. The website shows one framework, backend or environment at a time; the Markdown has every variant at once:
/llms.txt: the index of every page, with the guides in order./llms-full.txt: every page in a single file./llms/<stack>.md: one guide per stack (for example/llms/react-vite-node.md), with only its steps, in order. The list is in/llms.txt.- Any page with
.mdadded to its path, for example/sdk-integration-spa-backend.md. Each page also points to it with<link rel="alternate" type="text/markdown">.
In the Markdown versions every tab and option is written out and marked (for example, Only for Node.js or In production), and the code keeps its placeholders. Follow only the variant that matches the app.

