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

MFE JWT cookie not matching MFE user #643

Open
robrap opened this issue Jan 25, 2024 · 0 comments
Open

MFE JWT cookie not matching MFE user #643

robrap opened this issue Jan 25, 2024 · 0 comments

Comments

@robrap
Copy link
Contributor

robrap commented Jan 25, 2024

When an MFE loads, it loads and caches user information from the JWT cookie and displays this information in the header.

If the JWT cookie is later updated via logout/login in another browser tab, as an example, the JWT cookie may exist for a different user than the user cached in the previously loaded MFE. Before using the JWT cookie for an API call, it would be better if the MFE checked that the user_id of the JWT cookie matched the user_id cached in the MFE from load time.

If they mismatch, on option is to simply pop error that states that they can refresh to fix, and skips the API call. This way, the user won't lose data if they were in the middle of something, which would happen if we just refreshed or redirected to the login page, etc.

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

No branches or pull requests

1 participant