Skip to content

Commit

Permalink
Merge pull request #2030 from timdeschryver/docs/custom-parameters
Browse files Browse the repository at this point in the history
docs: update custom-parameters  documentation
  • Loading branch information
FabianGosebrink authored Oct 20, 2024
2 parents 51b039c + 6db6385 commit da77a40
Showing 1 changed file with 27 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ customParamsAuthRequest?: {
And you can pass them as an object like this:

```ts
AuthModule.forRoot({
config: {
authority: '<your authority address here>',
customParamsAuthRequest: {
response_mode: 'fragment',
prompt: 'consent',
},
},
}),
export const appConfig: ApplicationConfig = {
providers: [
provideAuth({
authority: '<your authority address here>',
customParamsAuthRequest: {
response_mode: 'fragment',
prompt: 'consent',
},
}),
],
};
```

## Dynamic custom parameters
Expand All @@ -41,3 +43,19 @@ login() {
```

> If you want to pass static parameters to the Security Token Service every time please use the custom parameters in the [Configuration](configuration.md) instead!
## NgModule

If you want to use custom parameters in the `NgModule`, you can do this as follows:

```ts
AuthModule.forRoot({
config: {
authority: '<your authority address here>',
customParamsAuthRequest: {
response_mode: 'fragment',
prompt: 'consent',
},
},
}),
```

0 comments on commit da77a40

Please sign in to comment.