Skip to main content

Authentication

signIn()

The signIn function checks the authentication and redirects to the login page if needed.

Parameters

ParameterTypeDescription
routerRouterThe router of the application to redirect if needed.

Usage

app.config.ts
export const appConfig: ApplicationConfig = {
providers: [
provideAppInitializer(() => signIn(inject(Router))),
...
]
}