nextjs + nestjs

i have a nextjs app with better auth setup. what would be the best way to handle auth verifcation on the side of the nestjs backend ?
Solution:
Hey, there is https://github.com/better-auth/better-auth/pull/1548 coming, but there is also comment from user juandl , where he explains how he implemented it.
GitHub
feat: nestjs support by ThallesP · Pull Request #1548 · better-au...
Adds support for the NestJS framework The PR adds full support for NestJS with decorators, guards, and a module for a seamless integration. Here's some examples: import { NestFactory } from...
Jump to solution
3 Replies
Solution
marekuss
marekuss2w ago
Hey, there is https://github.com/better-auth/better-auth/pull/1548 coming, but there is also comment from user juandl , where he explains how he implemented it.
GitHub
feat: nestjs support by ThallesP · Pull Request #1548 · better-au...
Adds support for the NestJS framework The PR adds full support for NestJS with decorators, guards, and a module for a seamless integration. Here's some examples: import { NestFactory } from...
zay
zayOP6d ago
yes i saw it but my problem comes from the fact that i handle auth on nextjs first (localhost:3001) and then i just want to access the session on the nestjs app (port 3000) i saw this https://www.better-auth.com/docs/concepts/cookies#cross-subdomain-cookies but i am not sure, will this only work in prod ?
Cookies | Better Auth
Learn how cookies are used in Better Auth.
zay
zayOP6d ago
thanks btw

Did you find this page helpful?