All primitives

Identity

Federated Auth & User Management

Let people have their own account.

The idea

Imagine building a fitness application.

You want people to sign in, save their workouts, and return later.

You don't want to build a password system from scratch.

Federated Authentication allows people to sign in using existing identity providers, while User Management helps your application manage their accounts.

Application blip

Fitness Club

Simulated sign-in

Member access

Sign in to continue

Choose how you would sign in to save your workouts and return to your account.

This is a simulated flow. No real sign-in, provider connection, or credentials are used.

Google · Microsoft · email

Behind the scenes

  1. Identity provider
  2. Authentication
  3. User account
  4. Personalized experience

The identity provider verifies the person signing in. Fitness Club then loads the matching user account and its saved workout history. In a real application, account access is validated on the server; this page only simulates the flow.

What could you build?

  • Membership applications
  • Customer portals
  • Team workspaces
  • Subscription services

Implementation notes

  • Keep identity IDs stable across providers.
  • Separate authentication from application roles.
  • Store only the profile data your app needs.

Implementing it

With a coding agent

Ask your agent to add sign-in

Agent setup (mock link)

Copy this prompt, fill in the bracketed details, and paste it into your coding agent. It describes the goal, the sign-in flow, and the guardrails.

Bracketed text marks details only you can fill in. 880 / 6,000 characters.

Fill in:APP OR PRODUCTSIGN-IN PROVIDERSPROFILE FIELDSPAGE AFTER SIGN-INPAGES THAT REQUIRE SIGN-INIMPORTANT SIGN-IN, SIGN-OUT, AND PROTECTED-PAGE CASES

Strong prompt · 76/100

Traditional SDK / API

Start a sign-in flow

TypeScript
const session = await ultrahost.auth.signIn({
  provider: "google",
  redirectTo: "/dashboard",
})

Key takeaway

Authentication answers: “Who are you?”

Next primitive

Authorization Layer