This repository aims to show how to create a react app that let's users login using their Github credentials using two seperate apps for backend and front-end.
The solution presented in this repo, uses the Github Oauth2 API. To run the code presented in this repo, you would need to register a new app in Github console and obtain the Github client id and Github client secret.
You would need to run both the front-end and the backend individually.
cd user-session
npm install
vim .env
# add variables GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET
## press ESC :wq
node index.js
In the above process once you install the libs
- create a .env file
- copy the id, secret from your Github dashboard where you registered your app
- assign those values to your github variables in the .env file
- save the .env file
Note: I use vim, as it's my preference but you can use any text editor
cd user-session-client
yarn install
vim .env
# add variables GITHUB_CLIENT_ID
## press ESC :wq
yarn start
In the above process once you install the libs
- create a .env file
- copy the id from your Github dashboard where you registered your app
- assign the client id to your github variables in the .env file
- save the .env file
Note: I use vim, as it's my preference but you can use any text editor
Hope you find this useful and if you like this repository, please give it a star.
I will be writing a detailed tutorial on how to work with this repo on my blog. Until then refer to my blog for other tutorials and "how-to" articles with detailed code samples.
If you like what I am doing, you can buy me a coffee
Click on the next link for more info on the software engineering career journey of the author.