Garrett Floyd
Garrett Floyd
Explore posts from servers
BABetter Auth
Created by Garrett Floyd on 4/15/2025 in #bug-reports
Session info isn't available fast enough on manual page reload, server sign in api needs reload
For any brave soul willing help me with this problem I posted to better-auths github I've included the info from that issue below Using SolidStart and Postgresql - better-auth version: 1.2.7 - OS: Microsoft Windows 11 HOME version: 10.0.26100 Build 26100 - browser: chrome A summary is given below. For full details go to https://github.com/Garrett-Floyd/better_auth_error and read reproduceBugInstructions.txt for a description of the current vs Expected behavior and the steps to reproduce. Possible Bug 1: When signing up and signing in users using server api, session info is not updated until page is manually refreshed. This is the case even when redirecting upon (sign in/sign up). When using client api this isn't a problem. Possible Bug 2: On manual page reload but not using hyperlinks the session cookie isn't always avaliable fast enough to be used in building the page. You can usually get session info fast enough if your using it in app.tsx (the root file in solidstart apps). However, if your using session infor in apps.tsx's props.children than the data may or may not be avaliable. This is especially an issue when on page load you fetch via GET request to some protected route. In my experience when this is done the session cookie is essentially never avaliable fast enough and the request is denied. I would like to redirect to login on when an user is not signed in and they try to access a protected resource and this bug makes that unfeasable.
2 replies
BABetter Auth
Created by Garrett Floyd on 4/15/2025 in #help
Session info isn't available fast enough on manual page reload, server sign in api needs reload
For any brave soul willing help me with this problem I posted to better-auths github I've included the info from that issue below Using SolidStart and Postgresql better-auth version: 1.2.7 OS: Microsoft Windows 11 HOME version: 10.0.26100 Build 26100 browser: chrome A summary is given below. For full details go to https://github.com/Garrett-Floyd/better_auth_error and read reproduceBugInstructions.txt for a description of the current vs Expected behavior and the steps to reproduce. Possible Bug 1: When signing up and signing in users using server api, session info is not updated until page is manually refreshed. This is the case even when redirecting upon (sign in/sign up). When using client api this isn't a problem. Possible Bug 2: On manual page reload but not using hyperlinks the session cookie isn't always avaliable fast enough to be used in building the page. You can usually get session info fast enough if your using it in app.tsx (the root file in solidstart apps). However, if your using session infor in apps.tsx's props.children than the data may or may not be avaliable. This is especially an issue when on page load you fetch via GET request to some protected route. In my experience when this is done the session cookie is essentially never avaliable fast enough and the request is denied. I would like to redirect to login on when an user is not signed in and they try to access a protected resource and this bug makes that unfeasable.
2 replies
SSolidJS
Created by Garrett Floyd on 3/6/2025 in #support
How do you get createAsync to refetch or mutate?
I have a webpage where I get a list of items from a database. I want to take advantage of SolidStart's preloading and the other benefits of a createAsync based resource so I used it instead of createResource. Users can click a delete button next to each list item to delete it, and the list should update in response (possibly via an action). Now it occurs to me that the docs don't currently specify when, if or how createAsync based resources refetch data or if the data can be mutated (say by useSubmission to avoid a bunch of trips between client and server). Does anyone know how to do this?
12 replies