@opengovsg/mockpass 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/express/sgid.js +3 -1
- package/package.json +1 -1
package/lib/express/sgid.js
CHANGED
|
@@ -138,7 +138,7 @@ function config(app, { showLoginPage, serviceProvider }) {
|
|
|
138
138
|
const encryptedNric = await encryptPayload(nric)
|
|
139
139
|
const scopesArr = scopes
|
|
140
140
|
.split(' ')
|
|
141
|
-
.filter((field) => field !== '
|
|
141
|
+
.filter((field) => field !== 'myinfo.nric_number')
|
|
142
142
|
console.info(`userinfo scopesArr ${scopesArr}`)
|
|
143
143
|
const myInfoFields = await Promise.all(
|
|
144
144
|
scopesArr.map((scope) =>
|
|
@@ -236,6 +236,8 @@ const concatMyInfoRegAddr = (regadd) => {
|
|
|
236
236
|
const sgIDScopeToMyInfoField = (persona, scope) => {
|
|
237
237
|
switch (scope) {
|
|
238
238
|
// No NRIC as that is always returned by default
|
|
239
|
+
case 'openid':
|
|
240
|
+
return persona.uuid.value
|
|
239
241
|
case 'myinfo.name':
|
|
240
242
|
return persona.name.value
|
|
241
243
|
case 'myinfo.email':
|