Authentication not updating
I have an incredibly simple auth setup following the guide here https://labs.convex.dev/auth/api_reference/react.
I want to use the <Authenticated> <Unauthenticated> and <AuthLoading> components to structure my code, but it seems that the <Authenticated> will never trigger.
I will either be in a state where I am unauthenticated or loading.
here is a super simple react component to demo my issue
after signing in, I will only ever see Loading... but I am be able to see my JWT token
3 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Update: I found the issue, I needed to add auth.addHttpRoutes(http); to my http.ts
NOTE: I think the docs here should be updated https://labs.convex.dev/auth/setup I already had the http.ts file in my setup and the automatic solution DID NOT update it properly for me, the process should explicilty call out that this needs to be checked and done
Set Up Convex Auth - Convex Auth
Authentication library for your Convex backend
glad to hear it worked out. thanks for the feedback!