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(auth): fix authenticating with cookie storage #372

Merged
merged 4 commits into from
Jul 26, 2022

Conversation

laurentlp
Copy link
Contributor

This PR fixes an issue where when the JWT token was stored in the cookie storage, the call to /env would fail with a 401. The request was denied because the window variable 'USE_JWT_COOKIES' was not set at this point.

To fix the problem, I renamed the /branding.js call to /public-env.js so that we can send any public environment variable to the front-end without authentication and passed the value of process.USE_JWT_COOKIES in it.

@laurentlp laurentlp requested a review from sebburon July 25, 2022 19:07
Copy link
Contributor

@sebburon sebburon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and fixes the issue

@laurentlp laurentlp merged commit 188fb5b into master Jul 26, 2022
@laurentlp laurentlp deleted the llp_fix_auth_with_cookies branch July 26, 2022 18:49
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