Dashboard
Authentication

Authentication overview

Project-scoped identity for your application users.

Project Authentication is an application-user identity layer. Each project receives its own publishable key, users, identities, sessions, signing key, redirect policy, email delivery, and OAuth Apps.

#Project identity boundary

IdentityOwnerPurpose
HALO account userHALOAccess the developer dashboard
Project Authentication userYour projectSign in to your application
Upstream provider identityGoogle, Apple, GitHub, MicrosoftVerify a project user
OAuth App clientYour projectRequest scoped access to a signed-in project user

#Email quickstart

  1. 1
    Configure URLs

    Set the site URL and every exact redirect URL the project may use.

  2. 2
    Configure email

    Add a Resend sending key, verified From address, and the three required HTML templates.

  3. 3
    Copy the publishable key

    The dashboard Authentication section displays the project key used by public endpoints.

  4. 4
    Create a user session

    Create the SDK client once, then sign up or sign in throughhalo.auth. The SDK persists the browser session and rotates refresh tokens automatically.

import { createClient } from "agihalo-node-sdk/auth";

const halo = createClient(
  "https://api.agihalo.com",
  HALO_PROJECT_PUBLISHABLE_KEY
);

const { data, error } = await halo.auth.signInWithPassword({
  email: "user@example.com",
  password: "use-a-strong-password",
});

if (error) throw error;

// The SDK automatically sends apikey + Bearer <access_token>.
const { data: currentUser } = await halo.auth.getUser();

#Public API

GET/api/v1/auth/settings
POST/api/v1/auth/signup
POST/api/v1/auth/token?grant_type=password
POST/api/v1/auth/token?grant_type=refresh_token
GET/api/v1/auth/user
POST/api/v1/auth/logout
GET/api/v1/auth/.well-known/jwks.json

#Choose the next guide