Usage with better auth ? #444
Answered
by
unnoq
hmartins370
asked this question in
Q&A
-
Is there any guide on how to integrate better auth with ORPC? |
Beta Was this translation helpful? Give feedback.
Answered by
unnoq
Apr 27, 2025
Replies: 1 comment 5 replies
-
I'm assuming you're using Next.js - if so, there’s nothing particularly special you need to do. Just call the better Auth functions inside your oRPC handler or middleware. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You just need to create two separate routes: one for oRPC and one for better auth. Don’t mix them into a single route.
/app/api/auth/[...all]/route.ts
→ for better auth/app/api/rpc/[...all]/route.ts
→ for oRPC