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

feat: refactor demo app to showcase sgid and mockpass login modes #1

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

SeanChinJunKai
Copy link

@SeanChinJunKai SeanChinJunKai commented Jul 14, 2024

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:

  • Details ...

Improvements:

  • Details ...

Bug Fixes:

  • Details ...

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-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7di8TGHWqMkGm\nSMAsp8K4H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6jG3wbWeDKhwuzxy+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 details

New dependencies:

  • "dotenv": "^16.4.5",
    "jsonwebtoken": "^9.0.2",
    "node-jose": "^2.2.0",
    "nodemon": "^3.1.4",

New dev dependencies:

  • dependency : dependency details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant