passport-workshopper
Version:
Learn Passport.js authentication with CLI-based exercises
13 lines (8 loc) • 729 B
Markdown
## Problem: Implement OAuth Authentication with GitHub using Passport.js
In this exercise, your goal is to authenticate users using Passport.js with GitHub OAuth strategy. You'll need to configure Passport to authenticate with GitHub and handle the callback after a successful authentication.
### Requirements
1. Set up the Passport GitHub OAuth strategy using `passport-github2`.
2. Implement the callback URL to handle the OAuth redirect and receive user data.
3. Print a success message (`LOGIN SUCCESS`) if the authentication is successful.
4. Print a failure message (`LOGIN FAILED`) if the authentication fails.
Use the following dummy GitHub OAuth credentials (client ID, client secret, etc.) for testing.