Unexpected SolidStart Behavior On Vercel. Can You Help?
I have an
Here's the flow:
1. I'm using a Solid store (
2. When the auth state changes, I update the Solid store.
3. If a user is authenticated AND they are on a page that has
Everything works as expected when running
1. An auth state change occurs.
2. I set
3. Then, I redirect the user to the app dashboard.
After deploying to Vercel, the redirect stopped working. After signing in, the app stays on the
I added a
If I refresh my browser, the redirect occurs.
Why is this happening? Does it have something to do with caching at Vercel?
I'm using the latest version of SolidStart in SSR mode.
Here's the code.
AuthContextProvider that works on npm run dev but doesn't work on Vercel. I'm lost. Any help would be appreciated.Here's the flow:
1. I'm using a Solid store (
createStore) to store auth state.2. When the auth state changes, I update the Solid store.
3. If a user is authenticated AND they are on a page that has
/auth in the pathname, I redirect the user to the app dashboard. This prevents authenticated users from accessing sign-in or sign-up pages.Everything works as expected when running
npm run dev. When a user signs in on the /auth/sign-in page: 1. An auth state change occurs.
2. I set
isAuthenticated to true3. Then, I redirect the user to the app dashboard.
After deploying to Vercel, the redirect stopped working. After signing in, the app stays on the
/auth/sign-in page. I added a
console.log to check both conditions, and both are true, but the redirect doesn't work. If I refresh my browser, the redirect occurs.
Why is this happening? Does it have something to do with caching at Vercel?
I'm using the latest version of SolidStart in SSR mode.
Here's the code.
