© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Authentication with Express backend + Next.js frontend - Better Auth
BA
Better Auth
•
12mo ago
•
7 replies
Xirynx
Authentication with Express backend + Next.js frontend
This is my first time using Better Auth
, so forgive me if this is obvious
I have an existing backend built with Express
, which has Better Auth setup and running
.
We are creating a new Next
.js frontend
, on a separate server
, which needs to authenticate against this backend
.
After reading the docs
, seems like authenticating on the Next
.js client side is fairly simple using the
better-auth/react
better-auth/react
package
, but trying to get the session on the Next
.js server side requires importing the
auth
auth
instance
, which I cannot access since its on our Express backend
.
What is the solution if I need to make a server side fetch to our Express backend
?
Solution
Well
, I followed this for server
-side session
:
https://www.better-auth.com/docs/integrations/next#for-nextjs-release-1517-and-below
Next.js integration | Better Auth
Integrate Better Auth with Next
.js
.
Jump to solution
Better Auth
Join
10,204
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Was this page helpful?
Yes
No
Similar Threads
Recent Announcements
Similar Threads
Validate Session on Next.js Frontend with Express Backend
BA
Better Auth / help
5mo ago
Problem with OAuth (Google) using BetterAuth with Express for backend and Next.js Frontend
BA
Better Auth / help
12mo ago
Authenticate Next.js app against Express backend.
BA
Better Auth / help
8mo ago
How can I use Better Auth with a Node.js Express backend and a separate Next.js frontend?
BA
Better Auth / help
5mo ago