Skip to content

Commit 9de012e

Browse files
Configure redirect_uri in Angular beta quickstart (auth0#10191)
1 parent e2f7e41 commit 9de012e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

articles/quickstart/spa/angular-beta/01-login.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ import { AuthModule } from '@auth0/auth0-angular';
4444
AuthModule.forRoot({
4545
domain: '${account.namespace}',
4646
clientId: '${account.clientId}'
47+
authorizationParams: {
48+
redirect_uri: window.location.origin
49+
}
4750
}),
4851
],
4952

@@ -52,7 +55,7 @@ import { AuthModule } from '@auth0/auth0-angular';
5255
export class AppModule {}
5356
```
5457

55-
We use the [`forRoot()` pattern](https://angular.io/guide/singleton-services#the-forroot-pattern) to configure the module, which takes the properties `domain` and `clientId`; the values of these properties correspond to the "Domain" and "Client ID" values present under the "Settings" of the single-page application that you registered with Auth0.
58+
We use the [`forRoot()` pattern](https://angular.io/guide/singleton-services#the-forroot-pattern) to configure the module, which takes the properties `domain` and `clientId`; the values of these properties correspond to the "Domain" and "Client ID" values present under the "Settings" of the single-page application that you registered with Auth0. On top of that, we configure `authorizationParams.redirect_uri`, which allows Auth0 to redirect the user back to the specific URL after successfully authenticating.
5659

5760
<%= include('../_includes/_auth_note_custom_domains') %>
5861

articles/quickstart/spa/angular-beta/files/index.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ import { AppComponent } from './app.component';
1515
BrowserModule,
1616
AuthModule.forRoot({
1717
domain: '${account.namespace}',
18-
clientId: '${account.clientId}'
18+
clientId: '${account.clientId}',
19+
authorizationParams: {
20+
redirect_uri: window.location.origin
21+
}
1922
}),
2023
],
2124
bootstrap: [AppComponent],

articles/quickstart/spa/angular-beta/interactive.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The SDK exports `AuthModule`, which is a module that contains all the services r
4848
3. Add `AuthModule` to the application by calling `AuthModule.forRoot` and adding to your application module's `imports` array.
4949
4. Inject `AuthService` into `AppComponent`.
5050

51-
To configure the module, we use the [`forRoot()` pattern](https://angular.io/guide/singleton-services#the-forroot-pattern), which takes the properties `domain` and `clientId`; the values of these properties correspond to the **Domain** and **Client ID** values that you can find under **Settings** in the Single-Page Application (SPA) that you registered with Auth0.
51+
To configure the module, we use the [`forRoot()` pattern](https://angular.io/guide/singleton-services#the-forroot-pattern), which takes the properties `domain` and `clientId`; the values of these properties correspond to the **Domain** and **Client ID** values that you can find under **Settings** in the Single-Page Application (SPA) that you registered with Auth0. On top of that, we configure `authorizationParams.redirect_uri`, which allows Auth0 to redirect the user back to the specific URL after successfully authenticating.
5252

5353
<%= include('../_includes/_auth_note_custom_domains') %>
5454

0 commit comments

Comments
 (0)