You worked so hard to make your application and you probably want others to use it as well! But you do not want to mix up tasks from different users. Thus, you need to authenticate them by creating secure accounts. But … solving authentication is HARD! Even today, the internet is full of tutorials on creating an efficient authentication system … with questionable results. Moreover, storing passwords and accounts in your database is prone to hacking attempts, taking on a lot of responsibility (looking at you, password re-users 🧐).
Luckily, most internet users use big service providers such as Google, Facebook, Instagram, and Github … and we can use their infrastructure to authenticate users. For this purpose, we will use the incredibly powerful library NextAuth providing access to 40+ authentication services. In the upcoming assignment, you will set up your application to use Github authentication, and in this part, we will set up your Github account to allow your application use this service.
In the top right part of the screen, click on your avatar and then on “Settings”
In the left menu at the very bottom, find “Develop Settings”, click on it
Click on “OAuthApps” and then “New OAuth App”
Please fill out this form using the values below
Click on Generate a new client secret
This will generate a new secret. Copy its value to the same secure location as your ClientID. You will not be able to see this key again!
Time for an exercise!