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.
Attributes
Section titled “Attributes”| Attribute | Default | Description |
|---|---|---|
app | ANUKA | App name shown under the logo |
auth-url | https://auth.anuka.pro | OAuth host |
client-id | — | OAuth client id for /authorize |
redirect-uri | {origin}/auth/callback | OAuth callback |
scope | openid profile email | OAuth scope |
user-name | — | Prefill signed-in user (skip session check) |
user-email | — | Shown under the name |
user-avatar | — | Avatar image URL (initial letter fallback) |
Session detection
Section titled “Session detection”The component detects an existing auth.anuka.pro session automatically:
- Explicit attributes win — if the host app already knows the session, pass
user-name/user-email/user-avatar. - Silent check — otherwise it calls
GET {auth-url}/api/mewithcredentials: 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/meendpoint returning{ name, email, avatar_url }- CORS:
Access-Control-Allow-Originfor app domains +Access-Control-Allow-Credentials: true
Behavior
Section titled “Behavior”- Anonymous — “Continue with ANUKA” → OAuth
/authorizeon 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=loginto the authorize URL. - Close: ✕ outlined circle, click outside, or
hide().
Design
Section titled “Design”- Card:
rgba(20,28,46,.94), 20px radius, 1px borderrgba(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#00D4FFborder, 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
- Auth always happens on auth.anuka.pro — apps never render their own password fields.
- One button. No social-provider list, no email field in the popup.
- The ANUKA logo is always the SVG logotype.
- Footer always reads “Secured by auth.anuka.pro”.
Session signature (standard, R4)
Section titled “Session signature (standard, R4)”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 type | Canonical line |
|---|---|
| Human — auth & apps | Confirm once per session — passkey, code or link — and stay signed in on this device. |
| Agent — key handshake | Agents 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-up | Admin 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 presence | Presence lasts 4 hours from check-in — held requests then live 15 minutes. |
| Widget | Sign 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”.