---
title: "Integration with React, Vue or Angular, frontend only"
description: "Add Block-Auth to a React, Vue or Angular app without a backend: the login widget shows who is signed in."
url: "/sdk-integration-frontend/"
language: "en"
guide: "React, Vue, Angular (frontend only)"
step: "Read first"
---

# React, Vue or Angular, frontend only

Follow this guide if your app is only a React, Vue or Angular frontend, with no backend of its own. At the end your users sign in with Block-Auth and your page shows who they are.

## What you'll build

You need **one piece**: the Block-Auth widget (`@block-auth.io/react`, `/vue` or `/angular`) in your frontend, with no backend routes.

1. The user presses the sign-in button and the login opens on the Block-Auth page (`auth.block-auth.io`), in a popup, or in the same tab if the browser blocks popups.
2. When they finish, the widget checks the result itself (PKCE, without any secret) and shows their profile menu.
3. The session lives in that browser tab: it survives reloads, the widget renews it on its own and the profile menu closes it.

## When to use it

The widget signs the user in **in the browser**: your page knows their address and roles, but no server has a session it can trust. Use it to show who is signed in and adapt your UI, not to protect data.

> **Note:** If your app has an API, private data or anything a server must authorize,
> follow [React, Vue or Angular (+ backend)](/sdk-integration-spa.md) instead:
> there your backend redeems the login with its API Secret and keeps its own
> session.

## Prepare your app

1. In the Dashboard, create your application following the [Integration Quickstart](/integration-quickstart.md#applications). As the domain, enter the host where your frontend runs (for example `your-app.com`).
2. Pick the keys based on where your app is going to run. Each environment has its own in [Applications » Integration details](/integration-quickstart.md#apps-retrieve-keys), and they don't mix. You only need the **API Key**: without a backend, your app never uses the API Secret.

| Where your app runs         | Which keys to use                                                                                                    | Where the login works                       |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| Your computer (`localhost`) | The **Development** ones. They work right away.                                                                      | Only on `localhost`, on any port            |
| Your live server            | The **Production** ones. They work once you [validate your domain](/integration-quickstart.md#apps-validate-domain). | Only on your validated domain, over `https` |

3. Fill in your data once in the [SDK Quickstart](/sdk-integration.md#setup), with **Frontend only** as the type: from then on, each step gives you the files and code already adapted to your app.

Next: [Your frontend](/sdk-integration-frontend-setup.md), the first required step.
