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?
3 Replies
Karl
KarlOP7d ago
Wait lmao I just changed the callbackURL on the signIn and it works now
Karl
KarlOP7d ago
No description
Karl
KarlOP7d ago
Is this the correct approach tho?

Did you find this page helpful?