Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 1.78 KB

README.md

File metadata and controls

50 lines (32 loc) · 1.78 KB

Installation

  1. Clone this repository: git clone https://github.com/kavyakapoor420/VerifyYoutubeGithubFollowing.git

    cd VerifyYoutubeGithubFollowing

  2. Install dependencies: npm install

  3. start application from terminal node app.js or npm start or nodemon app.js

How It Works

  1. 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.

  1. 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.

  1. API Endpoints

  2. Google Authentication:

    /auth/google: Initiates the Google OAuth process.

    /auth/google/callback: Handles the callback after Google authentication.

    /login/success: Redirects the user to the success page after YouTube subscription verification.

  3. GitHub Authentication:

/auth/github: Initiates the GitHub OAuth process.

/auth/github/callback: Handles the callback after GitHub authentication.

  1. 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.

  1. Templates
  2. login.ejs: Displays the login options for Google and GitHub.
  3. LoginSuccess.ejs: Success page if the user is authenticated and verified.
  4. YtVerificationFailed.ejs: Failure page for YouTube subscription check.
  5. GithubVerification.ejs: Failure page for GitHub follow check.