Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial google-auth setup with passport.js #79

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ DB_PASSWORD=your_db_password
DB_PORT=your_db_port_number
SERVER_PORT=your_server_port_number
JWT_SECRET=your_jwt_secret_key
GOOGLE_CLIENT_ID=google_client_id
GOOGLE_CLIENT_SECRET=google_client_secret
159 changes: 147 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@
"author": "",
"license": "ISC",
"dependencies": {
"@types/express-session": "^1.17.8",
"bcrypt": "^5.1.0",
"body-parser": "^1.20.2",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"express-session": "^1.17.3",
"jsonwebtoken": "^9.0.1",
"passport": "^0.6.0",
"passport-google-oauth20": "^2.0.0",
"passport-jwt": "^4.0.1",
"pg": "^8.10.0",
"reflect-metadata": "^0.1.13",
Expand All @@ -38,6 +41,7 @@
"@types/jsonwebtoken": "^9.0.2",
"@types/node": "^20.1.4",
"@types/passport": "^1.0.12",
"@types/passport-google-oauth20": "^2.0.12",
"@types/passport-jwt": "^3.0.9",
"@types/pg": "^8.10.1",
"@types/prettier": "^2.7.2",
Expand Down
2 changes: 2 additions & 0 deletions src/configs/envConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
export const DB_PORT = process.env.DB_PORT
export const SERVER_PORT = process.env.SERVER_PORT ?? 3000
export const JWT_SECRET = process.env.JWT_SECRET ?? ''
export const GOOGLE_CLIENT_ID = process.env.GOOGLE_CLIENT_ID ?? ''
export const GOOGLE_CLIENT_SECRET = process.env.GOOGLE_CLIENT_SECRET ?? ''

Check failure on line 13 in src/configs/envConfig.ts

View workflow job for this annotation

GitHub Actions / build

Insert `⏎`
Loading
Loading