friendlyeats-web icon indicating copy to clipboard operation
friendlyeats-web copied to clipboard

currentUser is null after logging in in app/page.tsx

Open pashpashpash opened this issue 6 months ago • 3 comments

I understand that page.tsx is a server rendered component, but is it possible to update currentUser somehow after a log in happens?

The flow I want:

  1. Sign in modal is shown on landing page
  2. If user is authenticated (currentUser is not null), page.tsx stops showing sign in modal

It works after refreshing, but without refreshing, currentUser remains null. What's the best practice to deal with this?

pashpashpash avatar Aug 23 '24 00:08 pashpashpash