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

refactor: remove SGID login #2253

Merged
merged 2 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 5 additions & 5 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@
"filename": "backend/.env-example",
"hashed_secret": "6748ca60457562b72fd832fddb31552789ce6370",
"is_verified": false,
"line_number": 64
"line_number": 59
},
{
"type": "Secret Keyword",
"filename": "backend/.env-example",
"hashed_secret": "a2eebfeb7f52d750b419d88a37acc905afe38591",
"is_verified": false,
"line_number": 87
"line_number": 82
}
],
"backend/src/core/middlewares/auth.middleware.ts": [
Expand All @@ -200,7 +200,7 @@
"filename": "backend/src/core/middlewares/auth.middleware.ts",
"hashed_secret": "159500287c06851df741128ec4b073ea394414b6",
"is_verified": false,
"line_number": 23
"line_number": 19
}
],
"backend/src/core/services/auth.service.ts": [
Expand All @@ -209,7 +209,7 @@
"filename": "backend/src/core/services/auth.service.ts",
"hashed_secret": "f114703480996b273d7e57cbd195b4ab1e70a21b",
"is_verified": false,
"line_number": 65
"line_number": 31
}
],
"backend/src/email/services/tests/email-template.service.test.ts": [
Expand Down Expand Up @@ -365,5 +365,5 @@
}
]
},
"generated_at": "2023-11-16T03:18:03Z"
"generated_at": "2024-05-02T12:39:06Z"
}
5 changes: 0 additions & 5 deletions backend/.env-example
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ EMAIL_CALLBACK_HASH_SECRET="abcde"
WORKER_SES_HOST=""
TELEGRAM_BOT_CONTACT_US_URL="https://go.gov.sg/postman-contact-us-recipient"
TELEGRAM_BOT_GUIDE_URL="https://go.gov.sg/postman-recipient-guide"
SGID_CLIENT_ID=""
SGID_CLIENT_SECRET=""
SGID_PRIVATE_KEY=""
SGID_REDIRECT_URI=""
SGID_VALID_DOMAINS="@open.gov.sg"

##### Email callback #####
# Generate a fake public key using
Expand Down
120 changes: 31 additions & 89 deletions backend/package-lock.json

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

2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@aws-sdk/client-sns": "3.370.0",
"@aws-sdk/rds-signer": "3.370.0",
"@aws-sdk/s3-request-presigner": "3.370.0",
"@opengovsg/sgid-client": "^2.1.0",
"@datadog/browser-rum": "^4.43.0",
jia1 marked this conversation as resolved.
Show resolved Hide resolved
"@sentry/node": "5.30.0",
"async-retry": "1.3.3",
"axios": "0.21.4",
Expand Down
36 changes: 0 additions & 36 deletions backend/src/core/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,6 @@ interface ConfigSchema {
flamingo: {
dbUri: string
}
sgid: {
clientId: string
clientSecret: string
privateKey: string
redirectUri: string
}
}

convict.addFormats({
Expand Down Expand Up @@ -813,36 +807,6 @@ const config: Config<ConfigSchema> = convict({
env: 'FLAMINGO_DB_URI',
},
},
sgid: {
clientId: {
doc: 'Client ID of application registered with sgID',
default: '',
env: 'SGID_CLIENT_ID',
format: 'required-string',
sensitive: true,
},
clientSecret: {
doc: 'Client secret of application registered with sgID',
default: '',
env: 'SGID_CLIENT_SECRET',
format: 'required-string',
sensitive: true,
},
privateKey: {
doc: 'Private key of application registered with sgID',
default: '',
env: 'SGID_PRIVATE_KEY',
format: 'required-string',
sensitive: true,
},
redirectUri: {
doc: 'Redirect URI of application registered with sgID',
default: '',
env: 'SGID_REDIRECT_URI',
format: 'required-string',
sensitive: true,
},
},
})

// If mailFrom was not set in an env var, set it using the app_name
Expand Down
Loading
Loading