Skip to content

averoli/github_auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

GitHub Social Login

CodeFactor

This is a Node.js application that allows users to authenticate with GitHub and store their access token and profile information in a database. The application uses Passport.js for authentication and MongoDB for data storage. It also includes endpoints for displaying all registered users, giving "star" to a repository, and protecting routes that require authentication.

Installation

Clone this repository to your local machine.

npm clone https://github.com/averoli/github_auth.git

RUN

cd astro-sound/server

Install all dependencies

npm install
npm run server

Your browser should automatically open the app.

Environment Variables

The following environment variables must be set in a .env file in the project directory:

  • PORT: The port number that the server will listen on.
  • DB_URL: The connection string for the MongoDB database.
  • GITHUB_CLIENT_ID: The client ID for the GitHub OAuth application.
  • GITHUB_CLIENT_SECRET: The client secret for the GitHub OAuth application.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

This application was inspired by the Passport.js documentation, the GitHub OAuth documentation, and the MongoDB documentation.

About

GitHub Social Login

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published