Better Auth + Solid Start
When using Better Auth within Solid Start -- after doing all the required configuration, do we simply use the Better Auth server client (instead of the client one) to invoke all auth related matters? So given a Solid Start action like below:
Is the above the expected way we interface with Better Auth on the server? Or is there some other behind the scenes stuff happening due to the below configuration?
Or lastly, should we still be using the Better Auth client on the frontend and do:
2 Replies
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
@JaspaJones I wish I could say I did -- I ended up pivoting to a normal SolidJS SPA + Elysia backend setup. I was fighting Solid Start with things related to authenticated states and protected routes. I may revisit it down the line when I have more time. I feel the Better Auth documentation wasn't exactly clear what to do next post setting up this config here for Solid Start:
I don't know if there is supposed to be some magic that happens, but my suspicion is that we lean on the Better Auth server client if you're relying on server actions from Solid Start. So like you saw me post above, I think the interaction pattern would be:
Unless of course you're doing something client side, then you would lean on the Better Auth web client instead.
I think it would be good if we, as a community, could build some crowd-sourced documentation on Better Auth patterns with Solid Start.