Skip to content

Conversation

@tomerb
Copy link
Contributor

@tomerb tomerb commented May 30, 2024

Use up-to-date logged-in user value from useAuth, instead of stale query data.
useAuth correctly refreshes, and holds the up-to-date value of the currently logged-in user.

This is fixing the following issue:

  1. User A is logged in, welcome screen is correct (Hi, A 👋🏼)
  2. User A logs off
  3. User B logs in, welcome screen is wrongly still showing A's welcome screen (Hi, A 👋🏼)
  4. Refresh the page, and welcome screen is showing correctly (Hi, B 👋🏼)

@alejsdev alejsdev changed the title Fix welcome page to show logged-in user 🐛 Fix welcome page to show logged-in user Jun 1, 2024
@alejsdev alejsdev added the bug Something isn't working label Jun 1, 2024
@alejsdev alejsdev merged commit 0eb5e18 into fastapi:master Jun 1, 2024
@alejsdev
Copy link
Member

alejsdev commented Jun 1, 2024

Great, thank you! 🥳 @tomerb

gusevyaroslove pushed a commit to gusevyaroslove/fastapi-template that referenced this pull request Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants