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

Change CSRF error handling to open login URL in new tab when necessary #519

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

indigane
Copy link
Contributor

Hitas Pull Request

Description

Sometimes when a user hasn't used Hitas for a while, they get a CSRF error when submitting a form.

The frontend checks for this, and redirects the user to the login page, which will re-set the CSRF token cookie.

This will however clear the form.

This PR changes the check to open the login page in a new window or tab instead and then closes that new window or tab after login letting the user to re-submit the form without clearing it.

Pull request checklist

Check the boxes for each DoD item that has been completed:

  • Testing
    • Changes have been tested

Tickets

HT-762

@indigane indigane force-pushed the feature/frontend-csrf-error-workaround branch from 3aa5d19 to 3306064 Compare December 20, 2024 10:39
@indigane indigane merged commit 348c73a into master Dec 20, 2024
5 checks passed
@indigane indigane deleted the feature/frontend-csrf-error-workaround branch December 20, 2024 12:19
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.

2 participants