Skip to content

Documentation

Authentication, MFA & user management for the Univeros framework. One line in config/modules.php — a complete, production-grade identity stack.

Polaris is the official authentication & user-management module for Univeros / Altair applications. A host registers one class and the app gains email-verified login, JWT access tokens with rotating refresh tokens, multi-factor authentication (TOTP/QR, SMS, email), single-use recovery codes, multi-tenant organizations with role-based access control, and a hardened security posture — contributed as routes, Cycle entities, migrations, and middleware with no further host wiring.

The name is the idea: Polaris is the fixed star your application’s identity navigates by.

AreaWhat you get
AuthenticationRegister, email verification, password login, /auth/me, logout / logout-all
TokensAsymmetric JWT access tokens (RS256/EdDSA) + opaque rotating refresh tokens with reuse detection; JWKS endpoint
SessionsPer-device session list, individual + global revocation
MFA / OTPTOTP (QR), SMS OTP, email OTP, recovery codes, login-MFA gate, step-up
PasswordsArgon2id, policy enforcement, breached-password hook, reset & change (logout-everywhere)
Multi-tenant RBACOrganizations, memberships, roles, permissions, invitations, org switching
AuthorizationDeclarative permission guard middleware + a programmatic Gate with policies
SecurityRate limiting, account lockout, anti-enumeration, audit log, key rotation
OpsPSR-14 domain events, notification fan-out, transient-row pruning, observability

The complete, authoritative specification lives in the Auth section:

DocContents
OverviewGoals, scope, framework integration
Data modelEntities, tables, relationships, migrations
FlowsRegister, login, refresh rotation, sessions, password
MFA & OTPTOTP/QR, SMS, email, recovery codes, step-up
Multi-tenant RBACOrganizations, memberships, roles, permissions, guard
API referenceFull endpoint catalog + error format
SecurityThreat model, cryptography, key management
Key rotationSigning-key lifecycle and rollover
ConfigurationConfig schema, env vars, bindings, dependencies
EventsPSR-14 domain events
TestingTest strategy + acceptance criteria
Implementation planPhased build order

Polaris is in active development, built in five phases — foundation, identity core, MFA & OTP, multi-tenant RBAC, and hardening & ops. Progress is tracked in the milestones and issues on GitHub.