jason
Explore posts from serversBABetter Auth
•Created by jason on 4/2/2025 in #help
Best way to protect routes in TanStack Start?
What's the best way to protect all private routes like
/dashboard*
, so they redirect to /login
if no session exists? I don't see this aspect in the example: https://github.com/better-auth/better-auth/tree/main/examples/tanstack-example
Below is my attempt, but session is always null
, even if the user is authenticated.
I'm using authClient.getSession()
b/c I believe this needs to work for both SSR and in the client.
CC @daveycodez Looking through the msg history, it appears you contributed the TanStack Start example, but I don't see this aspect in the example. Maybe you know?26 replies
CDCloudflare Developers
•Created by jason on 8/9/2024 in #pages-help
`Error: Dynamic require of node:path is not supported` causes runtime error - how to troubleshoot?

8 replies
CDCloudflare Developers
•Created by jason on 5/10/2024 in #workers-help
Using `R2 + image transformation API` vs the `Images` service
Are these effectively the same but with a lower storage cost for R2 storage? What are the advantages to using the Images API for storage vs the former?
15 replies
CDCloudflare Developers
•Created by jason on 5/9/2024 in #general-help
Sending email via mailchannels on a preview domain
I'd like to send emails via mailchannels on my project's preview url (e.g.
foo.pages.dev
), to use my site's auth flow. Is this possible?
I'm asking because usually Mailchannels requires TXT requires on the domain, which I can't set up on a preview domain. Or is it possible to use an API key with mailchannels instead?9 replies
CDCloudflare Developers
•Created by jason on 2/7/2024 in #pages-help
how to add durable object to Pages project?

6 replies