Skip to content

Assystant/Leaderboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Login

A simple project to demonstrate GitHub OAuth login integration with separate frontend and backend installations.

Features

  • GitHub OAuth authentication
  • Secure session management
  • User profile retrieval from GitHub
  • Environment-based configuration

Limitations

  • Only supports GitHub as an OAuth provider
  • No database integration (user data is not persisted)
  • 500- GitHub API call per user per hours

Installation

1. Clone the repository:

git clone https://github.com/itsnarutouzumaki/contribution.git
cd github-login

2. Install backend dependencies:

cd backend
npm install

3. Install frontend dependencies:

cd ../frontend
npm install

4. Setup environment variables for backend:

  • Copy .sample.env to .env in the backend directory:
    cp .sample.env .env

5. Run the backend application:

cd backend
npm run start

6. Run the frontend application:

cd ../frontend
npm run dev

7. Open your browser:

  • Visit the frontend port and click "Login with GitHub"

.env Configuration (Backend)

Your backend/.env file should look like as backend/.sample.env

Process Overview

  1. User clicks "Login with GitHub" on the frontend.
  2. User is redirected to GitHub for authentication.
  3. After successful login, GitHub redirects back to your backend.
  4. The backend exchanges the code for an access token.
  5. User profile information is retrieved and sent to the frontend for display.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published