Archival notice: Please do not use this in production. This is just a simple demo to show how you can use API routes w/ Next. I am not going to be updating this repo or responding to comments or issues about it anymore.
This is a demo of how you can use Next.js to allow users to login with an OAuth2 service. This demo is setup to use Discord login. It uses Next's API routes system. I'll write comments/document this better in the future, but for now it's scrapped together as an example.
You can see it in action here: https://next-discord-login.vercel.app/