Keyring Documentation
Keyring handles the authentication side of a Laravel application, taking care of signing in, registration, password resets, email verification, second factors, passkeys, step-up, devices, sessions, and account changes. It doesn't ship any UI of its own. Your application owns the pages and the account actions, and Keyring provides everything around them.
The pages below are grouped by topic.
Getting Started
- Quick Start: from installing Keyring to a working sign in, along with the pages to build and your settings page.
- Installation: the requirements, how to install, and the files Keyring publishes.
- Configuration: every option in
config/keyring.php, and theKeyringfacade. - Upgrading From Fortify: importing existing two factor data, mapping Fortify concepts, and replacing Fortify in a starter kit.
Signing In
- Factors: the built-in factors, and how to write your own.
- Policies: deciding what each user must prove.
- The Sign In Flow: login, the challenge page, the verification pipeline, responses, and pages.
- Step-Up: asking signed-in users to prove who they are again, from middleware or a controller, and reading what they proved.
- Passkeys & Security Keys: WebAuthn settings, and what Keyring does and doesn't check.
Account Security
- Managing Authenticators: adding, renaming, and removing sign-in methods, and recovery codes.
- Devices & Sessions: device recognition, the session registry, timeouts, and pruning.
- Protected Changes: changing the email address and the password.
- Risk: risk signals, and what to do about them.
- Security Log & Emails: the activity log, "was this you?" alerts, and security emails.
- Events: every event Keyring dispatches, and what each one carries.
Security
- Security: what Keyring guarantees, where each choice comes from, and its known limitations.
- OWASP ASVS and NIST SP 800-63B: where Keyring stands on every requirement of ASVS 5.0.0 that bears on it, what to turn on for each level, and what its assurance levels mean in NIST's terms.
Building Your Application
- Frontend: the Inertia pages, and the
@keyringjs/keyringbrowser package. - Headless Frontends: a frontend Laravel doesn't serve, such as a Nuxt app on another subdomain, signing in with Sanctum's session cookies.
- Example Application: every page, written in React.
- Extending Keyring: every option and hook in one place, and what stays fixed.
- Recipes: worked examples with real packages, such as IP locations, Maizzle emails, SMS codes, and social login.
- Testing: test helpers, fakes, factories, and the conformance suite.