feature-auth
Sign-in for the storefront: login, registration, password reset (request a link and set a new password) and logout, by email and password. The package runs the mutations and ships the forms. Your app keeps the session: it passes a provider that stores it, so this package never touches cookies.
Get started
Install the package with the peer dependencies it needs. It comes from the Evolve registry, which needs a one-time sign-in.
pnpm add @evolve-storefront/feature-auth @labdigital/graphql-fetcher @tanstack/react-query graphql next next-intl reactRequirements6
@labdigital/graphql-fetcher>=3@tanstack/react-query>=5graphql>=16next>=16.2.11 <17next-intl>=4react>=19Import its styles in the stylesheet where you load Tailwind. Without them the components render unstyled.
@import "@evolve-storefront/feature-auth/styles.css";Wrap your app in
AuthProvider. Setup lists its props.Add its translations to your message files with
evolve messages.
Then render it on a page:
"use client";
import { LoginForm } from "@evolve-storefront/feature-auth/login-form";import { AuthProvider } from "@evolve-storefront/feature-auth/provider";import { useRouter } from "next/navigation";
export function LoginPage() { const router = useRouter();
return ( <AuthProvider onAuthenticated={() => router.push("/account")} onLoggedOut={() => router.push("/")} > <LoginForm /> </AuthProvider> );}Components
What you place on your pages. Each one has a preview, its props, and how to change its layout.
Hooks
14 hooks to read and change the data yourself, for when you build your own UI. All hooks
More in this package
- Setup and server: what the package needs in your project.
- Advanced: contexts, data and cache helpers, schemas, other functions and constants, types.

