withUser redirect to login page takes much longer on Vercel than on localhost #691
Unanswered
azhong-git
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi I am using
withUser
on a page/ssr-required
following the official example. It will redirect to a static login page/auth
if user is not authenticated. However I found that the redirection itself takes quite long (as long as 4 seconds) when deployed on Vercel. It almost felt that the page is unresponsive for 4 seconds.I believe "this long pause" is contributed by redirection (not Firebase init on the auth page). My reasoning:
/auth
, in my case I expect to observe a brief moment of no content because I setwhenUnauthedBeforeInit: AuthAction.RETURN_NULL
on/auth.tsx
. I did observed this brief moment of no content, right after the long pause. This suggests the long pause is caused by redirection./auth
and did not observe the long pause.Other findings:
ssr-required
.Any help would be appreciated!
ssr-required/index.tsx that uses
withUser
to redirect to auth:auth.tsx static page
Beta Was this translation helpful? Give feedback.
All reactions