Skip to content

Commit 26d8a20

Browse files
committed
documented oauth part
1 parent 2450bca commit 26d8a20

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.env.sample

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
PORT=5000
22
GITHUB_OAUTH_CLIENT_ID=
33
GITHUB_OAUTH_CLIENT_SECRET=
4+
GITHUB_OAUTH_REDIRECT_URL=
45
SQLITE_PATH=./database.db
56
SECRET=

GITHUB_AUTH.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Github Authorization
2+
Follow the below steps to implement GitHub OAuth in your nodejs app
3+
4+
- Create OAuth App on github and get client_id and client_secret. Also specify OAuth callback url in OAuth App
5+
6+
- Save client_id, client_secret and callback url values in .env file (get help from .env.sample file)
7+
8+
- Create a frontend part (using template engine or any other library) to enable click to precede github OAuth
9+
10+
- Also save the secrets on frontend part
11+
12+
- On clicking github OAuth button it would redirect to github for authorization
13+
14+
- On successful authorization it would redirect back to callback url

0 commit comments

Comments
 (0)