mazipan / tanyaaja.in

❓Kumpulkan pertanyaan secara anonim dari siapa saja dengan mudah
https://tanyaaja.in
MIT License
138 stars 38 forks source link

Auth Delayed Load on Initial / First Load #38

Closed sozonome closed 1 year ago

sozonome commented 1 year ago

Describe the bug Authentication seems delayed when opening the site on initial / first load.

To Reproduce Steps to reproduce the behavior:

  1. Make sure already authenticated to the site
  2. Close the site / tab
  3. Reopen the site through new tab
  4. The authentication will not load, it will even redirect to login screen.
  5. But some time after being in login screen, it will then redirect to /account page

Expected behavior

  1. Auth loaded on initial / first load
  2. Not redirecting to login screen if already authenticated

Screenshots

https://github.com/mazipan/tanyaaja/assets/17046154/8a8fdedb-0259-4d97-8d2e-2e89fbf768dc

Additional context Add any other context about the problem here.

Browser: Brave v1.58.137 OS: macOS

mazipan commented 1 year ago

Not solving the slowness issue, since it also relate with the slow api response from Notion.

But @FarhanRafid97 adding a loader to guard this flow in #43

sozonome commented 1 year ago

Great LHF solution! The more important one is to prevent double login / redirect to login when already authenticated and the current solution already resolve it