Skip to content
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

fix: remove api-token cookie just for created '/' path #1487

Merged
merged 1 commit into from Aug 22, 2023

Conversation

Eisie96
Copy link
Contributor

@Eisie96 Eisie96 commented Aug 21, 2023

PR Type

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[ ] CI-related changes
[ ] Documentation content changes
[ ] Application / infrastructure changes
[ ] Other:

What Is the Current Behavior?

The api-token needs to be removed, when the user logs out succesfully. It's not working in a multi-site PWA setup with a custom configured baseHref property (e.g. /en). The used cookieService.remove(key) method, to remove the apiToken, overwrites the cookie property from the window with the value apiToken=;path=/en;expires=Thu, 01 Jan 1970 00:00:00 GMT. The created path (e.g. '/en') differs with the initial path property from the apiToken ('/'). With the SameSite=Strict the browser doesn't allow to remove the cookie.

Issue Number: Closes #

What Is the New Behavior?

An option parameter is added to the cookieService.remove(key) method to allow custom options to remove cookies. With that it is possible to overwrite the path property from the generated cookie value.

Does this PR Introduce a Breaking Change?

[ ] Yes
[ ] No

Other Information

AB#88773

@Eisie96 Eisie96 self-assigned this Aug 21, 2023
@github-actions
Copy link

Azure Demo Servers are available:

@shauke shauke added this to the 4.2 milestone Aug 21, 2023
@shauke shauke merged commit 9ce4cf6 into develop Aug 22, 2023
27 checks passed
@shauke shauke deleted the fix/remove-cookie-on-path branch August 22, 2023 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants