NextAuth and custom paths

How would you use NextAuth in a t3 app, where I am developing on a virtual machine?
2 Replies
Dale
Dale15mo ago
Currently, I am trying to set up the NEXTAUTH_URL but it's not super straightforward how to do this? Instead of NEXTAUTH_URL=http://localhost:8000, I am using something like NEXTAUTH_URL=http://<ip address>:8000/next-api/auth (Note, we also are using next-api instead of api since we have a legacy api that we are trying to move away from) When I click the signin() function it redirects properly to http://<ip address>:8000/next-api/auth/signin but then when clicking on the "sign in with github" it redirects to http://localhost:3000/api/auth/signin/github Anybody have any ideas?
4z
4z15mo ago
Client API | NextAuth.js
The NextAuth.js client library makes it easy to interact with sessions from React applications.