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
Angular
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.
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
A signals-based service, an HTTP interceptor, and a route guard that fit Angular's DI model.
Register the SDK in your standalone app config and it's available across your dependency-injection tree. No module boilerplate.
AuthdogService exposes token, isLoading, isAuthenticated, and user as signals, so templates and computed() values stay in sync automatically.
authdogInterceptor attaches Authorization: Bearer <token> to outgoing HttpClient requests, so your API calls are authenticated for free.
Gate routes with the built-in functional guard. Unauthenticated users are redirected before a protected component ever loads.
The service hydrates the session on startup and keeps the token fresh, so isLoading tells you exactly when auth state is ready.
Integrates with Angular's DI and HttpClient the way the framework intends: fully typed signals, interceptor, and guard.
Add @authdog/angular and your environment's public key.
Add provideAuthdog() and the interceptor to your app config.
Attach the route guard and read auth state from the service's signals.
Install the SDK, add provideAuthdog() to your app config, and protect your routes today. Free to start, with secure defaults built in.