---
title: "SDK Quickstart"
description: "Pick the guide for your app and integrate Block-Auth from zero to production: React, Vue or Angular; PHP, Python, .NET or Node.js; or WordPress."
url: "/sdk-integration/"
language: "en"
---

# SDK Quickstart

Each guide takes you from zero to production, step by step. Pick the one that matches your app and follow only that one. Do its Quickstart steps, then Go live.

## How the pieces connect

Pick your stack and hover over a piece or a step to follow it.

The two login flows, step by step. On the website this is an interactive diagram.

**React, Vue, Angular (+ backend), widget in a popup:**

1. Your frontend → Block-Auth: Login in a popup (PKCE)
2. Block-Auth → Your frontend: One-time code
3. Your frontend → Your backend: `POST /code`
4. Your backend → Block-Auth: `POST /api/auth/token`
5. Block-Auth → Your backend: `{ address, roles }`
6. Your backend → Your frontend: httpOnly session cookie
7. Your frontend → Your backend: `GET /me`
8. Your backend → Your frontend: `{ address, roles }`

**PHP, Python, .NET, Node.js, and WordPress (redirect login):**

1. Your pages → Your backend: `GET /blockauth/login`
2. Your backend → Block-Auth: `POST /api/auth/authorize`
3. Your backend → Your pages: Redirect to the login
4. Your pages → Block-Auth: The user signs in
5. Block-Auth → Your pages: Back with ?code\&state
6. Your pages → Your backend: `GET /blockauth/callback`
7. Your backend → Block-Auth: `POST /api/auth/token`
8. Block-Auth → Your backend: `{ address, roles }`
9. Your backend → Your pages: Session cookie and redirect

## Why your backend redeems the code

Never let your backend trust a user `address` sent by the browser. The browser decides what it sends, and whether an address is signed into your app is public on-chain data: anyone could send another user's address and get their session.

That is why every guide ends the same way: Block-Auth gives the browser a **one-time code**, useless without your `apiSecret`, and **your backend** redeems it at `POST /api/auth/token` to get the user's address and roles from Block-Auth itself. Only then does it create its own session.

The only exception is [frontend only](/sdk-integration-frontend.md), for apps without a backend: the widget signs the user in by itself, so it only shows who is signed in and no server can trust that session.

## Set up your integration

Pick your guide and fill it in once. With this data and these choices, every code example and file in the guide comes out adapted to your app, ready to copy. What can’t be filled in for security, like the API Secret, is marked with a note next to the code.

On the website this is a form that fills every example with the app’s data. In the Markdown versions the examples keep placeholders such as `your_api_key` and `https://your-app.com`: replace them with the app’s values, following the [placeholders table](/sdk-integration-checklist.md#placeholders).
