Karl
BABetter Auth
•Created by Karl on 5/12/2025 in #help
How do I setup Discord OAuth2?
I have a Hono API running on localhost:3001 and a NextJS app on localhost:3000
On the server I have setup trustedOrigins and allowed localhost:3000
On the client I have set the baseURL to localhost:3001
And in the Discord Developer Portal the redirect URI is set to localhost:3001/api/auth/callback/discord
Once I complete the authentication flow I end up at localhost:3001/dashboard
How do I make it so I end up authenticated and at my NextJS app so localhost:3000/dashboard instead?
5 replies