Skip to content

SDK QUICKSTART

Connect AllAuth to your app.

Use SDK 1.4.4 in an existing React app. The browser talks to your app’s same-origin proxy; the proxy keeps the integration secret on the server.

1. Install the versioned package

pnpm add @allauth/react@https://allauth.co/sdk/allauth-react-1.4.4.tgz better-auth@1.7.7 @better-auth/passkey@1.7.7 lucide-react@^0.575.0

Keep React and React DOM on matching versions within the supported ranges below. Next.js is needed only for the Next.js proxy example.

Required peer dependencies declared by the latest AllAuth SDK package
Required peerSupported version
@better-auth/passkey1.7.7
better-auth1.7.7
react^18.3.0 || ^19.0.0
lucide-react^0.575.0
react-dom^18.3.0 || ^19.0.0

2. Configure your application environment

Create or choose an application in the AllAuth console. Use its exact Development or Production project identifier and registered app origin. Store the proxy secret in your server environment.

ALLAUTH_PROJECT=your-app-development
ALLAUTH_PROXY_SECRET=<server-only integration secret>
APP_ORIGIN=http://localhost:3000

Use HTTPS for deployed applications. Never put the proxy secret in public environment variables or browser code.

3. Add the Next.js same-origin proxy

In a Next.js app, create app/api/allauth/[...all]/route.ts:

import { createAllAuthProxy } from "@allauth/react/next";

const handler = createAllAuthProxy({
  project: process.env.ALLAUTH_PROJECT!,
  proxySecret: process.env.ALLAUTH_PROXY_SECRET!,
  appOrigin: process.env.APP_ORIGIN!,
});

export { handler as GET, handler as POST };

Other servers can implement the same signed, same-origin transport. Keep endpoint restrictions, selected-project cookies, origin checks and callback encoding aligned with the versioned proxy source.

4. Mount the native components

"use client";

import { AllAuthProvider, SignIn } from "@allauth/react";
import "@allauth/react/styles.css";

export default function SignInPage() {
  return (
    <AllAuthProvider basePath="/api/allauth" afterSignInUrl="/app">
      <SignIn />
    </AllAuthProvider>
  );
}

Keep the provider mounted across the app’s account and organisation flows. Standard components read the selected environment’s capabilities. Configure social providers in AllAuth before offering their sign-in flows.

Upgrading an existing app

  1. Check your dependency lockfile and release notes for the installed and target versions.
  2. Update the SDK pin and its matching server proxy, preserving your environment’s project identifier, origin and server secret.
  3. Rebuild the app and verify sign-in, callback returns, account settings and organisation management before deployment.
  4. Deploy the rebuilt application. Keep the previous immutable archive available for rollback.

SDK 1.4.4 is a backward-compatible update. Historical archive notes identify verified changes without inventing earlier compatibility guarantees. Optional version reports in newer SDKs support advisory dashboard notices; the lockfile remains the source for your installed dependency.