Polaris for PHP · 0.1.0

Auth your users can trust, and your agents can operate.

A self-hosted authentication library for PHP: users, sessions, rotating refresh tokens, MFA, organizations and roles, in your database and your code. One core, adapters for Laravel, Symfony, Yii and any PSR-15 application, and 52 endpoints whose behaviour is frozen by 1,201 recorded request/response steps replayed through every framework in CI.

$ composer require polaris/laravel
$ composer require polaris/symfony
$ composer require polaris/yii
$ composer require polaris/core polaris/psr15 polaris/pdo

Laravel · 13

polaris/laravel

php artisan polaris:install && php artisan migrate, then Route::middleware('auth:polaris').

/php/laravel examples/laravel

Symfony · 7.4 / 8

polaris/symfony

Register PolarisBundle, import the routes with type: polaris, put PolarisAuthenticator on a firewall.

/php/symfony examples/symfony

Yii · 3

polaris/yii

A yiisoft/config plugin: set the polaris params, and the routes and the polaris/authentication middleware are there.

/php/yii examples/yii

PSR-15 · Slim, Mezzio, any PSR-15 host

polaris/psr15

Polaris::create(new Config(...)), Pipeline::middleware(), Pipeline::handler().

/php/psr15 examples/slim

Why Polaris

01

Self-hosted, in your code

Users, sessions and credentials live in your database. Every port (mailer, SMS, cache, clock, encrypter) has a working default you can replace.

02

Specified end to end

Every endpoint is a YAML spec that is also the router; polaris manifest --format=openapi emits OpenAPI 3.1 from it.

03

Proven identical everywhere

The contract fixtures replay through PSR-15, Laravel, Symfony and Yii; the adapter conformance suite runs on 3 databases.

04

More than your framework gives you

Rotating refresh-token families with reuse detection, step-up authentication, JWKS rotation, TOTP / SMS / email MFA with recovery codes, organizations with roles and invitations, audit log, 35 events.

Features

A complete identity stack, in your database.

Each area is specified in the documentation and implemented by polaris/core; 184 recorded fixtures freeze every response.

Origin

Polaris was built as the identity module of Univeros and reached 1.0 there in June 2026. In September 2026 it was extracted into the polaris/* packages, with every response frozen by 184 recorded fixtures. Since September 2026 Univeros hosts run univeros/polaris 2.x, the same module rebuilt on polaris/core (its documentation); 1.x installations keep working on their own branch.

Version 0.1.0

Polaris for PHP is 0.1. The code is the module that reached 1.0 in Univeros, contract-frozen, and univeros/polaris 2.x runs on it today; the 0.x number means the package boundaries may still move before the external security review, after which 1.0.0 is tagged. Roadmap · Security

Get started

Install Polaris for PHP in your framework.

Laravel, Symfony, Yii or any PSR-15 application, on PostgreSQL, MySQL, SQLite.