hack4impact-uiuc / h4i-recruitment

H4I recruitment platform
https://h4i-recruitment.vercel.app
15 stars 3 forks source link

OAuth Login Functionality #366

Closed josh-byster closed 4 years ago

josh-byster commented 4 years ago

Summary Unify our login efforts by using a standardized format like Google OAuth to handle logins to the platform for security and ease of access.

Problem We have an awesome, robust authentication server that was built out by Product Infrastructure, which is currently in use. It's a great tool for being able to quickly integrate auth into our applications. However, as we move towards increased complexity with multiple chapters & organizations using the platform, there are two main issues that can complicate things as we begin to expand this:

Solution

PassportJS has a great OAuth strategy which can be integrated to our application with few lines of code (I estimate under 50). I think it's an awesome, lightweight solution for projects that use authentication, especially with it handling a lot under the hood while also providing a lot of customizability.

However, the rather few lines of code written are challenging (conceptually) to understand. I hope that the LAH OAuth integration can serve as a reference point for this. In addition, there are some great online explanations that help to guide the setup and intuition behind some of the more conceptually challenging serializeUser and deserializeUser.

Acceptance Criteria