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
Copy file name to clipboardExpand all lines: src/content/docs/bff/fundamentals/session/handlers.md
+16-4Lines changed: 16 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,14 @@ You typically use the following two ASP.NET Core authentication handlers to impl
17
17
* the OpenID Connect authentication handler to interact with the remote OIDC / OAuth token service, e.g. Duende IdentityServer
18
18
* the cookie handler to do local session management
19
19
20
-
Furthermore, the BFF plumbing relies on the configuration of the ASP.NET Core default authentication schemes. This describes how the two handlers share the work.
20
+
The BFF relies on the configuration of the ASP.NET Core default authentication schemes. Both the OpenID Connect authentication
21
+
handler and cookie handler need to be configured, with the ASP.NET Core authentication system default schemes specified:
21
22
22
-
OpenID Connect for *challenge* and *signout* - cookies for all the other operations:
23
+
*`DefaultScheme` should be the cookie handler, so the BFF can do local session management;
24
+
*`DefaultChallengeScheme` should be the OpenID Connect handler, so the BFF defaults to remote authentication;
25
+
*`DefaultSignOutScheme` should be the OpenID Connect handler, so the BFF uses remote sign-out.
[Google Cloud Identity Platform](https://cloud.google.com/identity-platform), [Amazon Cognito](https://aws.amazon.com/cognito/), and more.
41
52
42
-
The exact settings depend on the OIDC provider and its configuration settings. We recommend:
53
+
The exact settings to use depend on the OIDC provider and its configuration settings. We recommend to:
43
54
44
55
* use authorization code flow with PKCE
45
56
* use a *response_mode* of *query* since this plays nicer with *SameSite* cookies
46
-
* use a strong client secret. Since the BFF can be a confidential client, it is totally possible to use strong client authentication like JWT assertions, JAR or MTLS. Shared secrets work as well of course.
57
+
* use a strong client secret. Since the BFF can be a confidential client, it is possible to use strong client authentication like JWT assertions, JAR, or ,TLS. Shared secrets work as well.
47
58
* turn off inbound claims mapping
48
59
* save the tokens into the authentication session so they can be automatically managed
49
60
* request a refresh token using the *offline_access* scope
0 commit comments