The universal Angular authentication library. One API, multiple providers, production-ready UI — add complete auth to your Angular app in minutes, not weeks.
Demo
·
Documentation
·
Report Bug
·
Request Feature
demo.mov
@ngx-addons/omni-auth is a modular, provider-agnostic authentication library for Angular. It gives you a single, unified API for sign-up, sign-in, password reset, social login, passwordless authentication, and more — regardless of which backend you use. Swap providers without rewriting your auth logic or UI.
Built for Angular 20+ with a zoneless-first architecture and RxJS at its core, omni-auth is designed for the modern Angular ecosystem.
Use omni-auth if you are:
- An Angular developer who needs authentication but doesn't want to build forms, flows, guards, error handling, and token management from scratch.
- A team or startup shipping a product fast — omni-auth gives you a complete, polished authentication experience with a single component:
<omni-auth-ui-mat>. - An enterprise team that needs to switch or support multiple auth providers (AWS Cognito today, Supabase tomorrow) without rewriting frontend code.
- A freelancer or agency building client projects — drop in a battle-tested auth system and focus on the business logic that matters.
- A developer who values clean architecture — omni-auth separates concerns into core logic, provider connectors, and UI packages so you can use only what you need.
| Scenario | omni-auth helps you |
|---|---|
| Starting a new Angular project that needs user authentication | Get a complete auth flow running in minutes with pre-built Material Design UI components |
| Migrating from one auth provider to another | Swap the connector package — your UI and business logic stay untouched |
| Building a SaaS, dashboard, or internal tool | Full support for sign-up, sign-in, password reset, MFA, social login, and passwordless auth |
| Need social login (Google, Facebook, Apple, GitHub, Microsoft) | Built-in social provider buttons with configurable providers per connector |
| Want to support passwordless / OTP authentication | First-class passwordless support — just enable it in config |
| Prototyping or building an MVP quickly | One component, three lines of config — authentication done |
- Install the packages:
pnpm install @ngx-addons/omni-auth-core @ngx-addons/omni-auth-ui-material @ngx-addons/omni-auth-cognito- Configure authentication:
import {configureAuth} from "@ngx-addons/omni-auth-core";
//...
providers: [
configureAuthCognitoConnector({
cognito: {
userPoolId: environment.cognito.userPoolId,
userPoolClientId: environment.cognito.userPoolClientId,
},
}),
configureAuth({
authService: AuthAwsCognitoService,
})
]
//...- Add the UI component:
<omni-auth-ui-mat></omni-auth-ui-mat>That's it — you have a fully functional authentication flow with sign-in, sign-up, password reset, and more.
- Provider-Agnostic — Write your auth logic once, connect any supported backend (AWS Cognito, Supabase, and more coming)
- Production-Ready UI — Beautiful Material Design components for every auth flow out of the box
- Zoneless Architecture — Built for Angular's zoneless future, optimized for performance
- Complete Auth Flows — Sign-up, sign-in, confirm sign-up, confirm sign-in (MFA/OTP), password reset, change password, and sign-out
- Social Authentication — Google, Facebook, Apple, GitHub, Microsoft, and custom providers
- Passwordless Login — OTP-based authentication with minimal configuration
- Route Protection — Built-in authentication guards and routing utilities
- Bearer Token Management — Automatic JWT injection into HTTP requests via interceptor
- Customizable Content — Full i18n support with configurable labels, messages, and error text
- Type-Safe — Comprehensive TypeScript types and interfaces throughout
| Feature | AWS Cognito | Supabase | Firebase |
|---|---|---|---|
| Email + Password | ✅ | ✅ | 🔜 |
| Username + Password | ✅ | ✅ | 🔜 |
| Passwordless (OTP) | ✅ | ✅ | 🔜 |
| Social Providers | ✅ | ✅ | 🔜 |
| Custom Attributes | ✅ | ✅ | 🔜 |
| Password Reset | ✅ | ✅ | 🔜 |
| Token Refresh | ✅ | ✅ | 🔜 |
Full documentation with guides, API reference, and live demos is available at ngx-addons.github.io/omni-auth.
MIT — See the LICENSE file for details.