get-convex / get-convex/better-auth
Difficulty running TanStack example
- Dominant language
- TypeScript
- Stars
- 764
- Forks
- 126
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
First of, the work done here is super impressive, thank you for that 🙏
For TanStack Start example - couldn't run the example.
README.md invites to use `build:watch`, a command that is not found in `package.json` (example and main dir).
`__root.tsx`
```
beforeLoad: async (ctx) => {
const token = await getAuth()
```
Will give 500 for an unauthed user. I wonder how is this mitigated, I saw other issues around this area.
Steps to run the project require building first, I wonder how is it possible to run it on a cloud deployment.
Is this production ready, or am I missing something?
Again, really impressed and I'd like to adopt it, I'd appreciate your guidance.
---
Another inquiry - related to the diff between the implementation here to the guide brought by `better-auth` (despite it not mentioning convex):
https://www.better-auth.com/docs/integrations/tanstack
> [Usage tips](https://www.better-auth.com/docs/integrations/tanstack#usage-tips)
We recommend using the client SDK or authClient to handle authentication, rather than server actions with auth.api.
When you call functions that need to set cookies (like signInEmail or signUpEmail), you'll need to handle cookie setting for TanStack Start. Better Auth provides a tanstackStartCookies plugin to automatically handle this for you.
I wonder about the choice of not using `tanstackStartCookies` in the example, nor middleware as in the example attached.
Contributor guide
Research direction
Start with the TanStack example's README.md, package.json files, and __root.tsx. Try the documented build:watch command, then inspect the unauthenticated beforeLoad path and the steps required for a cloud deployment. Done means clarifying or correcting the run instructions and documenting the expected authentication and deployment behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, build-system, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100