Backoffice Login: Move access/refresh tokens to secure cookies (V17)#20820
Merged
kjac merged 10 commits intorelease/17.0from Nov 14, 2025
Merged
Backoffice Login: Move access/refresh tokens to secure cookies (V17)#20820kjac merged 10 commits intorelease/17.0from
kjac merged 10 commits intorelease/17.0from
Conversation
* feat: adds the `credentials: include` header to all manual requests * feat: adds `credentials: include` as a configurable option to xhr requests (and sets it by default to true) * feat: configures the auto-generated fetch client from hey-api to include credentials by default * Add OpenIddict handler to hide tokens from the back-office client * Make back-office token redaction optional (default false) * Clear back-office token cookies on logout * Add configuration for backoffice cookie settings * Make cookies forcefully secure + move cookie handler enabling to the BackOfficeTokenCookieSettings * Use the "__Host-" prefix for cookie names * docs: adds documentation on cookie settings * build: sets up launch profile for vscode with new cookie recommended settings * docs: adds extra note around SameSite settings * docs: adds extra note around SameSite settings * Respect sites that do not use HTTPS * Explicitly invalidate potentially valid, old refresh tokens that should no longer be used * Removed obsolete const --------- Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
iOvergaard
approved these changes
Nov 13, 2025
Contributor
iOvergaard
left a comment
There was a problem hiding this comment.
Tested the same things as in the linked Pull Request.
✅ In addition, I verified that the cookies are now enabled by default and cannot be turned off.
✅ The VSCode launch profile works, setting the cookie to SameSite=None through an environment variable
✅ Updated the READMEs to remove the mention of the now-removed "Enabled" setting
AndyButland
approved these changes
Nov 14, 2025
Contributor
AndyButland
left a comment
There was a problem hiding this comment.
Works as expected in my tests too.
Contributor
|
There are failures on acceptance tests though - in the trace can see the error of: And console log of: |
1 task
8 tasks
|
This pull request has been mentioned on Umbraco community forum. There might be relevant details there: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites
Description
This is the V17 equivalent of #20779 for V16 - see that PR for details.
...with the obvious exception that
Umbraco:CMS:Security:BackOfficeTokenCookie:Enabledhas been removed. Starting from V17, tokens will always be redacted and passed between the backoffice client and the server in secure cookies.Testing this PR
See #20779