Tuzemec
Tuzemec
Explore posts from servers
BABetter Auth
Created by Tuzemec on 4/14/2025 in #help
Anyone managed to create a server side protected route?
I'm a bit AFK because of the holidays and I'll take a better look at your example, but for the catching the login errors I do the following using the client:
const result = await signIn.email({
email: email(),
password: password(),
});

if (result.error) {
throw new Error(result.error.message);
}
const result = await signIn.email({
email: email(),
password: password(),
});

if (result.error) {
throw new Error(result.error.message);
}
12 replies
BABetter Auth
Created by Tuzemec on 4/14/2025 in #help
Anyone managed to create a server side protected route?
Ahhh... const event = getRequestEvent() was exactly what I was missing. Thank you! Just out of curiosity - in your example you are basically moving the sign-in action to a server function. Why not just use the authClient in the browser?
12 replies
SSolidJS
Created by Tuzemec on 4/3/2024 in #support
Context and HMR
Huh... got it. Moved the context out of App and it works as expected. Thanks!
4 replies