S
SolidJS10mo ago
sh1man

Cookie bug

https://github.com/sh1man999/solidstart-auth.git The problem is the following: After I called logInAction, I set cookies and redirected to the main page, but the redirect did not occur
GitHub
GitHub - sh1man999/solidstart-auth: Created with StackBlitz ⚡️
Created with StackBlitz ⚡️. Contribute to sh1man999/solidstart-auth development by creating an account on GitHub.
9 Replies
bigmistqke
bigmistqke10mo ago
you will have more chance on getting a response if make a stackblitz/playground reproduction
sh1man
sh1manOP10mo ago
stackblitz/playground doesn't want to work with Vinxi
sh1man
sh1manOP10mo ago
you can check it like this. cookies will be empty
No description
Birk Skyum
Birk Skyum10mo ago
Vinxi works fine with Stackblitz - all the SolidStart examples run there, if you adjust the end of this url: https://stackblitz.com/github/solidjs/solid-start/tree/main/examples/basic
StackBlitz
Solid-start Basic Example - StackBlitz
Run official live example code for Solid-start Basic, created by Solidjs on StackBlitz
sh1man
sh1manOP10mo ago
sh1man999
StackBlitz
Solid-start Basic Example - StackBlitz
Run official live example code for Solid-start Basic, created by Solidjs on StackBlitz
bigmistqke
bigmistqke10mo ago
I couldn't get stackblitz to work. gives me Error: Context is not available. I cloned your repro instead. Solution is I think the following: instead of
export const route = {
load: () => getUserProfile(),
};
export const route = {
load: () => getUserProfile(),
};
do
export const route = {
load: getUserProfile,
};
export const route = {
load: getUserProfile,
};
but not a solidstart expert tbh... so grain of salt ❄️
sh1man
sh1manOP10mo ago
If you clone the project into Git, it works. https://stackblitz.com broken the whole problem is that it is impossible to get cookies on stackblitz
sh1man
sh1manOP10mo ago
If you comment out these lines everything will work
No description
sh1man
sh1manOP10mo ago
I solved the problem, you just need to revise the cache return redirect(paths.home, {revalidate: SESSION_CACHE_KEY});
Want results from more Discord servers?
Add your server