Skip to content

Commit

Permalink
deprecate and remove old auth APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
youngbryanyu committed Feb 23, 2024
1 parent f3746bc commit c01e7c1
Show file tree
Hide file tree
Showing 20 changed files with 290 additions and 1,784 deletions.
1 change: 1 addition & 0 deletions backend/config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"REFRESH_TOKEN_SECRET": "$REFRESH_TOKEN_SECRET::string",
"ACCESS_TOKEN_SECRET": "$ACCESS_TOKEN_SECRET::string",
"PASSWORD_SECRET": "$PASSWORD_SECRET::string",
"RETRY_LIMIT": 2,
"MONGO_DB": {
"CONNECTION_RETRIES": 2,
"CONNECTION_RETRY_TIMEOUT": 1000,
Expand Down
1 change: 1 addition & 0 deletions backend/config/testing.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"REFRESH_TOKEN_SECRET": "$REFRESH_TOKEN_SECRET::string",
"ACCESS_TOKEN_SECRET": "$ACCESS_TOKEN_SECRET::string",
"PASSWORD_SECRET": "$PASSWORD_SECRET::string",
"RETRY_LIMIT": 2,
"MONGO_DB": {
"CONNECTION_RETRIES": 2,
"CONNECTION_RETRY_TIMEOUT": 1000,
Expand Down
8 changes: 4 additions & 4 deletions backend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ module.exports = {
testMatch: ['**/tests/**/*.test.ts'],
coverageThreshold: { /* TODO: set thresholds to 80% after finishing register tests */
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80
branches: 25,
functions: 25,
lines: 25,
statements: 25
}
},
collectCoverage: true, /* force tests to pass coverage or else will exit with error */
Expand Down
2 changes: 2 additions & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@
"simple"
],
"dependencies": {
"async-retry": "^1.3.3",
"crypto-js": "^4.2.0",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"express-rate-limit": "^7.1.5",
"helmet": "^7.1.0",
"jsonwebtoken": "^9.0.2",
"mongoose": "^8.0.3",
"rate-limit-mongo": "^2.3.2",
"simple-app-config": "^1.2.0",
"winston": "^3.11.0",
"winston-daily-rotate-file": "^4.7.1"
Expand Down
145 changes: 145 additions & 0 deletions backend/pnpm-lock.yaml

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

2 changes: 0 additions & 2 deletions backend/src/app.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* Application setup */
import express, { Express } from 'express';
import mongoose from 'mongoose';
import authRoute from './auth-deprecated/routes/authRoutes';
import healthCheckRoute from './healthCheck/routes/healthCheckRoutes';
import { API_URLS_V1 } from './constants';
import logger from './logging/logger';
Expand Down Expand Up @@ -67,7 +66,6 @@ class App {
* Mounts the routes for the backend API endpoints.
*/
private mountRoutes(): void {
this.expressApp.use(API_URLS_V1.AUTH, authRoute);
this.expressApp.use(API_URLS_V1.HEALTH_CHECK, healthCheckRoute);
}

Expand Down
32 changes: 0 additions & 32 deletions backend/src/auth-deprecated/constants.ts

This file was deleted.

Loading

0 comments on commit c01e7c1

Please sign in to comment.