feat: refactor demo app to showcase sgid and mockpass login modes #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Currently, the demo app is not connecting to mockpass
Solution
Implemented the integration with mockpass.demos.sg for MockPass and SGID login modes.
Features:
Improvements:
Bug Fixes:
Before & After Screenshots
BEFORE:
[insert screenshot here]
AFTER:
[insert screenshot here]
Tests
What tests should be run to confirm functionality?
Deploy Notes
Notes regarding deployment of the contained body of work. These should note any
new dependencies, new scripts, etc.
New environment variables:
MYINFO_AUTHORISE_URL="https://mockpass.demos.sg/myinfo/v3/authorise"
MYINFO_TOKEN_URL="https://mockpass.demos.sg/myinfo/v3/token"
MYINFO_PERSON_URL="https://mockpass.demos.sg/myinfo/v3/person"
MYINFO_CLIENT_ID="singpassdemo"
MYINFO_ATTRIBUTES="uinfin,name,sex,race,nationality,dob,email,mobileno,regadd,housingtype,hdbtype,marital,edulevel,noa-basic"
MYINFO_PURPOSE="MyInfo Demo"
MYINFO_CLIENT_SECRET="mockSecret"
SGID_AUTHORISE_URL="https://mockpass.demos.sg/v2/oauth/authorize"
SGID_SCOPE="openid myinfo.nric_number myinfo.name myinfo.email myinfo.sex myinfo.race myinfo.mobile_number myinfo.registered_address myinfo.date_of_birth myinfo.nationality myinfo.housingtype myinfo.hdbtype myinfo.marital_status"
SGID_TOKEN_URL="https://mockpass.demos.sg/v2/oauth/token"
SGID_PERSON_URL="https://mockpass.demos.sg/v2/oauth/userinfo"
PRIVATE_KEY="-----BEGIN PRIVATE KEY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prjh2qk2GfOy0gikaRgmTUP3nVK1LC57GWJMker/UQ2kWCJCs\nRyMzpgd8cQKBgQCE5q8KKrjJEOp6jG3wbWeDKhwuzxy+Z6B+5V3MiXH/YzN+KDy/\nKF/5ZNCieFvGAy8cGNKQbuxubgWy/bmnM+cErgB1si+oib77LrF+L92lPfg6wVxv\nijqH6nQkLLI73RiwRhqSuqZ93hFN0cX7zh4rDhbvE9OX0HqxI+DKesqeyQKBgEln\nhPMQTsSATPcMAQ/Nb4/nk1SIqtQWQ7/I2EkKVtus/xGlTvkqdsaJo19g2V6kA+6P\njsrwTQZaskK6n9OgSxfbYbohipXgyNUqX6fEdhvKX7G5gOP2CbMzr9THRNUhh7gm\npUXlMfaJKbndHnWay46OKex7YItdKVV5a5k1AEHhAoGBAIVSqdn2f4mVgdQxDls6\nDPp0XJW2D9nI9w9mm+wZc9TtI7X+7+1LZ609vDHAEfj8flTMl0t/ovaaZWmEHCpg\nFKM9rIqep3tZy6qqgo63peDk+RPV3UVgnUwq0+mBwhnHPWQf2nfYnZZHwsldfHWP\ny0U6Qc7UNI3EjJEJPTI4Zifg\n-----END PRIVATE KEY-----\n"
New scripts:
script
: script detailsNew dependencies:
"jsonwebtoken": "^9.0.2",
"node-jose": "^2.2.0",
"nodemon": "^3.1.4",
New dev dependencies:
dependency
: dependency details