You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -180,19 +180,19 @@ MSAL Angular is a wrapper around MSAL.js (i.e. *msal-browser*). As such, many of
180
180
181
181
### Configuration
182
182
183
-
You can initialize your application in several ways, for instance, by loading the configuration parameters from another server. See [Configuration options](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/v2-docs/configuration.md) for more information.
183
+
You can initialize your application in several ways, for instance, by loading the configuration parameters from another server. See [configuration options](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/v2-docs/configuration.md) for more information.
184
184
185
-
In the sample, authentication parameters reside in [auth-config.ts](./SPA/src/app/auth-config.ts). These parameters then are used for initializing MSAL Angular configuration options in [app.module.ts](./SPA/src/app/app.module.ts).
185
+
In the sample, authentication parameters reside in [auth-config.ts](./SPA/src/app/auth-config.ts). These parameters are used for initializing MSAL Angular configuration options in [app.module.ts](./SPA/src/app/app.module.ts).
186
186
187
187
### Sign-in
188
188
189
189
**MSAL Angular** exposes 3 login APIs: `loginPopup()`, `loginRedirect()` and `ssoSilent()`. First, setup your default interaction type in [app.module.ts](./SPA/src/app/app.module.ts):
@@ -238,26 +238,26 @@ If you already have a session that exists with the authentication server, you ca
238
238
```typescript
239
239
export class AppComponent implements OnInit {
240
240
241
-
constructor(
242
-
private authService: MsalService,
243
-
) {}
241
+
constructor(
242
+
private authService: MsalService,
243
+
) {}
244
244
245
-
ngOnInit(): void {
245
+
ngOnInit(): void {
246
246
const silentRequest: SsoSilentRequest = {
247
-
scopes: ["User.Read"],
248
-
loginHint: "user@contoso.com"
247
+
scopes: ["User.Read"],
248
+
loginHint: "user@contoso.com"
249
249
}
250
250
251
251
this.authService.ssoSilent(silentRequest)
252
-
.subscribe({
253
-
next: (result: AuthenticationResult) => {
254
-
console.log("SsoSilent succeeded!");
255
-
},
256
-
error: (error) => {
257
-
this.authService.loginRedirect();
258
-
}
259
-
});
260
-
}
252
+
.subscribe({
253
+
next: (result: AuthenticationResult) => {
254
+
console.log("SsoSilent succeeded!");
255
+
},
256
+
error: (error) => {
257
+
this.authService.loginRedirect();
258
+
}
259
+
});
260
+
}
261
261
}
262
262
```
263
263
@@ -269,22 +269,22 @@ The sign-out clears the user's single sign-on session with **Azure AD B2C**, but
269
269
270
270
### IDTokenValidation
271
271
272
-
Whenyoureceivean [IDtoken](https://docs.microsoft.com/azure/active-directory/develop/id-tokens) directly from the IdP on a secure channel (e.g. HTTPS), such is the case with SPAs, there’s no need to validate it. If you were to do it, you would validate it by asking the same server that gave you the ID token to give you the keys needed to validate it, which renders it pointless, as if one is compromised so is the other.
272
+
Whenyoureceivean [IDtoken](https://learn.microsoft.com/azure/active-directory-b2c/tokens-overview) directly from the IdP on a secure channel (e.g. HTTPS), such is the case with SPAs, there’s no need to validate it. If you were to do it, you would validate it by asking the same server that gave you the ID token to give you the keys needed to validate it, which renders it pointless, as if one is compromised so is the other.
0 commit comments