README.md

February 24, 2026 · View on GitHub

Logo

@ngx-addons

omni-auth

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

License MIT Build & Tests Downloads

What is omni-auth?

@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.

Who is this for?

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.

When should you use omni-auth?

Scenarioomni-auth helps you
Starting a new Angular project that needs user authenticationGet a complete auth flow running in minutes with pre-built Material Design UI components
Migrating from one auth provider to anotherSwap the connector package — your UI and business logic stay untouched
Building a SaaS, dashboard, or internal toolFull 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 authenticationFirst-class passwordless support — just enable it in config
Prototyping or building an MVP quicklyOne component, three lines of config — authentication done

Quick Start

  1. Install the packages:
pnpm install @ngx-addons/omni-auth-core @ngx-addons/omni-auth-ui-material @ngx-addons/omni-auth-cognito
  1. Configure authentication:
import {configureAuth} from "@ngx-addons/omni-auth-core";

//...
providers: [
  configureAuthCognitoConnector({
    cognito: {
      userPoolId: environment.cognito.userPoolId,
      userPoolClientId: environment.cognito.userPoolClientId,
    },
  }),
  configureAuth({
    authService: AuthAwsCognitoService,
  })
]
//...
  1. 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.

Key Features

  • 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

Supported Providers

FeatureAWS CognitoSupabaseFirebase
Email + Password🔜
Username + Password🔜
Passwordless (OTP)🔜
Social Providers🔜
Custom Attributes🔜
Password Reset🔜
Token Refresh🔜

List of Packages

PackageDescriptionNPM LinkDownloads
@ngx-addons/omni-auth-coreCore authentication libraryNPM VersionNPM Downloads
@ngx-addons/omni-auth-ui-materialMaterial Design UI components for authenticationNPM VersionNPM Downloads
@ngx-addons/omni-auth-cognitoAWS Cognito connector for authenticationNPM VersionNPM Downloads
@ngx-addons/omni-auth-supabaseSupabase connector for authenticationNPM VersionNPM Downloads

Documentation

Full documentation with guides, API reference, and live demos is available at ngx-addons.github.io/omni-auth.

License

MIT — See the LICENSE file for details.