-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Add pivot for Server-rendering sample #34611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| * <xref:Microsoft.AspNetCore.Authentication.RemoteAuthenticationOptions.SaveTokens%2A>: Defines whether access and refresh tokens should be stored in the <xref:Microsoft.AspNetCore.Authentication.AuthenticationProperties> after a successful authorization. This property is set to `false` to reduce the size of the final authentication cookie. | ||
|
|
||
| ```csharp | ||
| oidcOptions.SaveTokens = false; | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can only set SaveTokens to false if we aren't using the CookieOidcRefresher because we need the refresh token. It's set to true here in the server project, and the comment here explains more in depth why it's needed.
| * <xref:Microsoft.AspNetCore.Authentication.RemoteAuthenticationOptions.SaveTokens%2A>: Defines whether access and refresh tokens should be stored in the <xref:Microsoft.AspNetCore.Authentication.AuthenticationProperties> after a successful authorization. This property is set to `false` to reduce the size of the final authentication cookie. | |
| ```csharp | |
| oidcOptions.SaveTokens = false; | |
| ``` | |
| * <xref:Microsoft.AspNetCore.Authentication.RemoteAuthenticationOptions.SaveTokens%2A>: Defines whether access and refresh tokens should be stored in the <xref:Microsoft.AspNetCore.Authentication.AuthenticationProperties> after a successful authorization. This property is set to `true` so the refresh token gets stored for non-interactive token refresh. | |
| ```csharp | |
| oidcOptions.SaveTokens = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you want it changed on the other spot (without BFF Auto) because the CookieOidcRefresher is in use in that spot as well. I changed it to true with your text.
halter73
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good other than the SaveTokens bit.
Co-authored-by: Stephen Halter <[email protected]>
Co-authored-by: Stephen Halter <[email protected]>
Fixes #34605
cc: @ngboardway ... It's a fairly simple chop-job 🔪 on the "without BFF pattern Auto" pivot. I just cut out the bits about the client project and client-server behaviors here and make a few language changes from "Auto" to "Server" rendering and two projects to one project. Everything else remains the same. I think Stephen will review this today before he takes off OOF. If so, I'll merge it and merge it LIVE ⚡ immediately for quick appearance in the article today.
The sample apps that I put up last night to go with this are at ...
WRT a BFF pivot server sample and "Server" section, we'll consider it if devs ask. Right now, I think we should go with this and see what kind of feedback we get.
Internal previews