Authdog

Angular

Authentication for Angular, the native way

Add auth with a root-provided, signals-based service, a functional HTTP interceptor, and a route guard. Authdog integrates with Angular's dependency injection and HttpClient instead of bolting on beside them.

One provider
Add provideAuthdog() to your app config and the service, interceptor, and guard are available across DI. No NgModule plumbing.
Signals-based state
Auth state is exposed as Angular signals, so templates and computed values update the moment a user signs in or out.
One guard per route
Drop the route guard onto a path and unauthenticated users are redirected before the component loads.
Authenticated HttpClient
The interceptor attaches the bearer token to outgoing requests, so your API calls are authenticated for free.

Provide it once

// app.config.ts
import { provideAuthdog, authdogInterceptor } from "@authdog/angular"

export const appConfig = {
  providers: [
    provideAuthdog({ publicKey: "pk_…" }),
    provideHttpClient(withInterceptors([authdogInterceptor])),
  ],
}

Auth state as signals

// profile.component.ts
import { AuthdogService } from "@authdog/angular"

export class ProfileComponent {
  readonly auth = inject(AuthdogService)

  // signal-driven state
  user = this.auth.user
}

Dependency injection native

Everything Angular apps need

A signals-based service, an HTTP interceptor, and a route guard that fit Angular's DI model.

01

provideAuthdog()

Register the SDK in your standalone app config and it's available across your dependency-injection tree. No module boilerplate.

  • Standalone app config
  • No NgModule boilerplate
02

Signals-based service

AuthdogService exposes token, isLoading, isAuthenticated, and user as signals, so templates and computed() values stay in sync automatically.

  • token, user, isAuthenticated
  • Works in computed()
03

HTTP interceptor

authdogInterceptor attaches Authorization: Bearer <token> to outgoing HttpClient requests, so your API calls are authenticated for free.

  • Functional interceptor
  • HttpClient native
04

Route guard

Gate routes with the built-in functional guard. Unauthenticated users are redirected before a protected component ever loads.

  • Functional guard
  • Redirect before load
05

Automatic bootstrap

The service hydrates the session on startup and keeps the token fresh, so isLoading tells you exactly when auth state is ready.

  • Hydrates on startup
  • Keeps the token fresh
06

Typed & native

Integrates with Angular's DI and HttpClient the way the framework intends: fully typed signals, interceptor, and guard.

  • Fully typed
  • DI and HttpClient native
01

Install

Add @authdog/angular and your environment's public key.

02

Provide

Add provideAuthdog() and the interceptor to your app config.

03

Guard & read

Attach the route guard and read auth state from the service's signals.

Add auth to your Angular app.

Install the SDK, add provideAuthdog() to your app config, and protect your routes today. Free to start, with secure defaults built in.