Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hi-shekhar/node_oauth2
Oauth2 authentication using passport
https://github.com/hi-shekhar/node_oauth2
authentication authorization cookie ejs express-session google knex nodejs oauth2 passportjs postgresql typescript
Last synced: about 1 month ago
JSON representation
Oauth2 authentication using passport
- Host: GitHub
- URL: https://github.com/hi-shekhar/node_oauth2
- Owner: hi-shekhar
- Created: 2023-04-02T20:55:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-10T12:22:53.000Z (over 1 year ago)
- Last Synced: 2024-01-28T01:09:25.187Z (11 months ago)
- Topics: authentication, authorization, cookie, ejs, express-session, google, knex, nodejs, oauth2, passportjs, postgresql, typescript
- Language: TypeScript
- Homepage:
- Size: 202 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node OAuth 2.0
The Application implement the OAuth 2.0 using Node.js and Passport.js
## Login Page
![Auth Page Screen Shot](./assets/auth_page.png)## Consent Page
![Consent Page Screen Shot](./assets/consent_page.png)## User Profile Page
![Logged In Page Screen Shot](./assets/logged_in_page.png)## Built With
1. Node.js
2. Passport.js
3. Postgres SQL
4. EJS
5. Knex## Installation
1. Clone the repo
```sh
git clone https://github.com/shekbruce/node_oauth2.git
```
2. Install NPM packages
```sh
npm install
```## Running the application
1. Create .env file and add below enironment variables
* PORT
* DB_CLIENT
* DB_HOST
* DB_PORT
* DB_USER
* DB_PASSWORD
* DB_NAME
* GOOGLE_CLIENT_ID
* GOOGLE_CLIENT_SECRET
* GOOGLE_REDIRECT_URL
* SECRET_KEY
2. ```sh
npm run dev-start
```
3. Go to http://localhost:PORT/## Application Work flow
![Application work flow](./assets/workflow.png)