Angular authentication template

Every screen before the session starts, built from the Styloviz components

Eight screens — sign in, register, two-step verification, single sign-on, lock screen, forgot password, reset password and a signed-in end page. Every call goes through auth.data.ts: set one URL and they POST to your API, leave it empty and a demo mode runs in the browser. Standalone Angular 21 components, Tailwind CSS 4 and a dark-mode toggle.

Live preview
Screenshot of the Styloviz Auth Template
screens, one route each
8
sign-in providers on the login page
3
digit code, verified on the last digit
6
cooldown before a code or link is resent
30 s

Walkthrough · 1:30

What it does, page by page

  1. 1. Sign in

    Open

    Continue with Google, GitHub or SSO, or an email and password with “Keep me signed in” and a Forgot password? link. A failed sign-in says “That email and password do not match an account.” and clears the password; when the API answers that a second factor is required, the page goes on to two-step verification.

  2. 2. Register

    Open

    Full name, work email, password and a terms checkbox. Under the password, a strength meter and the policy as a checklist — at least 8 characters, a letter, a number — each rule ticking as it is met. On success it says “Check your email” with the address masked.

  3. 3. Two-step verification

    Open

    A 6-digit code input that verifies as soon as the last digit is typed, or a recovery code instead. Send a new code shows a 30-second countdown before it can be pressed again; a wrong code clears the boxes and says so.

  4. 4. Single sign-on

    Open

    Enter a work email and the page finds the organisation from its domain, says “Northwind Labs uses single sign-on for northwind.example” and offers Continue to Northwind Labs. A domain with no SSO configuration gets that message and a link to sign in with a password.

  5. 5. Lock screen

    Open

    “Welcome back, Ava Chen” — the session’s owner, their password and Unlock. After three wrong passwords it offers a reset, and there is a way to sign in as someone else.

  6. 6. Forgot password

    Open

    One email field. The answer is the same whether or not the account exists — “If an account exists for …” with the address masked — so the page cannot be used to test who is registered. For Gmail, Outlook, Yahoo, Proton and iCloud addresses it adds a button to open that inbox; Resend link waits 30 seconds.

  7. 7. Reset password

    Open

    Opened with a token in the link. No token shows “Invalid or expired link” and a way to request a new one; otherwise a new password with the same rule checklist, a Caps Lock warning and a confirm field that says when the two match. Success tells the user every other device has been signed out — the sign-out itself is your backend’s job.

  8. 8. Signed in

    Open

    Where every flow ends: “You’re signed in”, with links back to sign in and to the lock screen. In your app it is replaced by a redirect — it is the one file to delete when you wire the template in.

Built from Styloviz components

The template is a composition of the same packages you install from npm — nothing in it is a one-off copy of a component.

Components the template imports
ComponentPackageUsed for
sv-input-field@styloviz/input-fieldevery email, password, name and recovery-code field
sv-otp-input · sv-checkbox@styloviz/formsthe 6-digit code, “Keep me signed in” and the terms checkbox
sv-password-strength@styloviz/password-strengththe strength meter on register and reset
sv-alert-banner@styloviz/alert-bannerfailed sign-in, code, unlock and reset messages
sv-button@styloviz/buttonprovider buttons and every action, with loading labels
ThemeService@styloviz/corethe light / dark toggle

What it would cost to build

Our estimate for building the same thing from scratch is 1–2 weeks for one experienced Angular developer — roughly 50–70 hours for the eight screens, the policy checklist, the code and resend timers, domain-based SSO, the account-neutral reset flow and the specs — before any of your own backend work. It is an estimate, not a measurement.

Questions

Does it connect to my backend?

Yes. Set AUTH_API.baseUrl in auth.config.ts and the screens POST to auth/sign-in (which answers requiresTwoFactor ), auth/register , auth/verify , auth/verify/resend , auth/unlock , auth/forgot-password and auth/reset-password . Leave it empty and demo mode runs in the browser: any password works except wrong , and any code except 000000 .

How does single sign-on find the provider?

From the email domain, through AUTH_SSO_DOMAINS in auth.config.ts — a map of domain to organisation name, with three demo domains. Replace it with your own list, or with a lookup against your identity provider.

Can I change the password rules?

Yes — AUTH_PASSWORD_POLICY in auth.config.ts sets the minimum length and whether a letter, a number or a symbol is required. The register and reset checklists are built from it, so they always show the rules you enforce.

Which Angular and Tailwind versions does it need?

Angular 21 or 22 with standalone components and signals, and Tailwind CSS 4. The download is a complete Angular project: npm install && npm start .

What license covers it?

The Auth template is free under the MIT license, like the free Styloviz packages it imports — download it without a license key.

Looking for something else? See every template