-
Clone this repository: git clone https://github.com/kavyakapoor420/VerifyYoutubeGithubFollowing.git
cd VerifyYoutubeGithubFollowing
-
Install dependencies: npm install
-
start application from terminal node app.js or npm start or nodemon app.js
How It Works
- Google OAuth (YouTube Subscription Verification):
When users sign in with Google, they must also grant access to their YouTube account.
The app will check if they are subscribed to the BYTE YouTube channel ->the CHANNEL_ID environment variable.
If the user is subscribed, they are redirected to the success page.
- GitHub OAuth (Follow Verification):
When users sign in with GitHub, the app checks if they GitHub account (bytemait ).
If they are following the specified account, they are redirected to the success page.
-
API Endpoints
-
Google Authentication:
-
GitHub Authentication:
- Failure Routes:
/youtube/verification/failed: Displays a failure page if the user is not subscribed to the YouTube channel.
/github/verification/failed: Displays a failure page if the user is not following the specified GitHub account.
- Templates
- login.ejs: Displays the login options for Google and GitHub.
- LoginSuccess.ejs: Success page if the user is authenticated and verified.
- YtVerificationFailed.ejs: Failure page for YouTube subscription check.
- GithubVerification.ejs: Failure page for GitHub follow check.