Skip to content

Commit

Permalink
Merge pull request #2027 from timdeschryver/docs/quick-start
Browse files Browse the repository at this point in the history
docs: add standalone quickstart
  • Loading branch information
FabianGosebrink authored Oct 17, 2024
2 parents 31e5abc + ae9af62 commit 656cc1f
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/site/angular-auth-oidc-client/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,37 @@ After installing the library you can get started with the lib like below.

## Using a local configuration

### Standalone

Use the `provideAuth` function to configure the library.

```ts
import { ApplicationConfig } from '@angular/core';
import { AuthModule, LogLevel } from 'angular-auth-oidc-client';
// ...

export const appConfig: ApplicationConfig = {
providers: [
provideAuth({
config: {
authority: '<your authority address here>',
redirectUrl: window.location.origin,
postLogoutRedirectUri: window.location.origin,
clientId: '<your clientId>',
scope: 'openid profile email offline_access',
responseType: 'code',
silentRenew: true,
useRefreshToken: true,
logLevel: LogLevel.Debug,
},
}),
// ...
],
};
```

### NgModule

Import the module and services in your module.

```ts
Expand Down

0 comments on commit 656cc1f

Please sign in to comment.