Skip to content

Login Popup

One login popup, every ANUKA app. A Web Component with the auth-style animated card — constellation, cyan glow, ANUKA logotype — and a single outlined button that sends the user to auth.anuka.pro.

<script src="https://docs.anuka.pro/anuka-login.js"></script>
<anuka-login app="Mentor"></anuka-login>

Then open it from your sign-in button:

document.querySelector('anuka-login').show();

Works in React, Astro, Vue, or plain HTML. No framework lock-in.

AttributeDefaultDescription
appANUKAApp name shown under the logo
auth-urlhttps://auth.anuka.proOAuth host
client-id—OAuth client id for /authorize
redirect-uri{origin}/auth/callbackOAuth callback
scopeopenid profile emailOAuth scope
user-name—Prefill signed-in user (skip session check)
user-email—Shown under the name
user-avatar—Avatar image URL (initial letter fallback)

The component detects an existing auth.anuka.pro session automatically:

  1. Explicit attributes win — if the host app already knows the session, pass user-name / user-email / user-avatar.
  2. Silent check — otherwise it calls GET {auth-url}/api/me with credentials: include. On 200 it renders the avatar + name button (“Continue as …”); on 401 it shows the anonymous button.

The silent check needs on the auth app:

  • GET /api/me endpoint returning { name, email, avatar_url }
  • CORS: Access-Control-Allow-Origin for app domains + Access-Control-Allow-Credentials: true
  • Anonymous — “Continue with ANUKA” → OAuth /authorize on auth.anuka.pro.
  • Signed in — avatar + name + email button → same OAuth flow (SSO, no password re-entry).
  • “Use a different account” — re-renders anonymous and adds prompt=login to the authorize URL.
  • Close: ✕ outlined circle, click outside, or hide().
  • Card: rgba(20,28,46,.94), 20px radius, 1px border rgba(255,255,255,.1)
  • Background: twinkling constellation + pulsing radial cyan glow
  • Logo: ANUKA SVG logotype (always SVG, never text)
  • Button: outlined — transparent with rgba(0,212,255,.07) tint, 2px #00D4FF border, white bold text; hover glow
  • Close: outlined circle, cyan on hover
  • Animations: overlay fade, spring card entrance, star twinkle, glow pulse
  • Fonts: Plus Jakarta Sans
  1. Auth always happens on auth.anuka.pro — apps never render their own password fields.
  2. One button. No social-provider list, no email field in the popup.
  3. The ANUKA logo is always the SVG logotype.
  4. Footer always reads “Secured by auth.anuka.pro”.

Every sign-in surface explains its session in ONE line under the primary control: method · duration · who confirms, in this fixed order. Surfaces copy the canonical line for their session type verbatim — they never paraphrase it and never invent a duration (durations come only from the measured session-policy table, audit #3536 R5). Style: 12.5px muted, never truncated, never in a tooltip. Owner of this standard: UX & PM (task #4416); a new session type gets its line added here first.

Session typeCanonical line
Human — auth & appsConfirm once per session — passkey, code or link — and stay signed in on this device.
Agent — key handshakeAgents sign in with a key — each session lasts 24 hours and the founder approves it.
Agent — admin contour (after R2)Agents sign in with a key — admin sessions last 1 hour and are approved one by one.
Admin step-upAdmin session — 30 minutes; the account holder confirms each session.
Key pickup (onboarding)Key pickup — the code lives 15 minutes and works once; the founder approves the claim.
Founder presencePresence lasts 4 hours from check-in — held requests then live 15 minutes.
WidgetSign in once — the widget uses this app’s session, nothing extra to confirm.

Founder/Agent gate toggle — the explanation is one line and swaps with the selected side:

  • Founder: “Founder — that’s a person: ANUKA account, passkey or code, confirmed once per session.”
  • Agent: “Agent — that’s an agent: sign in with a key; each session lasts 24 hours and the founder approves it.”

“Agent sign-in with password” does not exist — agents sign in with a key, and every surface says so. The widget has ONE “Sign in” with a role-based next step; the agent entry is labelled “Agent sign-in with a key”.