You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When an sgID client requests for the scope myinfo.registered_address on an Myinfo profile with non-Singapore address, such as this below regadd block from an existing profile S9912364H, then an HTTP 500 response is sent.
Expected behavior
Mockpass should support testing with non-Singapore address, so it should do whatever sgID does with non-Singapore addresses. Presumably that is to return a non-error response containing some string for the registered address? (I have no idea what sgID actually does in this case. Hopefully it does not also return an error?)
Additional context
Log message:
/var/task/lib/express/sgid.js:238
!!regadd.block.value || !!regadd.street.value
^
TypeError: Cannot read properties of undefined (reading 'value')
at concatMyInfoRegAddr (/var/task/lib/express/sgid.js:238:20)
at sgIDScopeToMyInfoField (/var/task/lib/express/sgid.js:292:14)
at /var/task/lib/express/sgid.js:156:24
at Array.map (<anonymous>)
at /var/task/lib/express/sgid.js:155:17
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
The text was updated successfully, but these errors were encountered:
Describe the bug
When an sgID client requests for the scope
myinfo.registered_address
on an Myinfo profile with non-Singapore address, such as this belowregadd
block from an existing profileS9912364H
, then an HTTP 500 response is sent.To Reproduce
Steps to reproduce the behavior:
myinfo.registered_address
scopeOr to an Mockpass instance in stateless mode,
ACCESS_TOKEN=$(curl -s -X POST -H "Content-type: application/json" -d '{"grant_type":"authorization_code","client_id":"test_id","client_secret":"test_secret_value","code_verifier":"value","code":"eyJwcm9maWxlIjp7Im5yaWMiOiJTOTkxMjM2NEgiLCJ1dWlkIjoiZTcwZTlmZWEtNjBmMS0zNmFhLTYzNDYtNjM1MDMyZDM4MmM5In0sInNjb3BlcyI6Im9wZW5pZCBteWluZm8ubnJpY19udW1iZXIgbXlpbmZvLm5hbWUgbXlpbmZvLmVtYWlsIG15aW5mby5tb2JpbGVfbnVtYmVyIG15aW5mby5kYXRlX29mX2JpcnRoIG15aW5mby5yZXNpZGVudGlhbHN0YXR1cyBteWluZm8ucmVnaXN0ZXJlZF9hZGRyZXNzIG15aW5mby5zZXggbXlpbmZvLnJhY2UgbXlpbmZvLm5hdGlvbmFsaXR5Iiwibm9uY2UiOiJDcDdWSTZUTVlrUk1PZE1paDdJa2g1VVJ5R2ZhalpWZ1hpbExDODVObWU0In0="}' https://mockpass.app.airbase.sg/v2/oauth/token | jq -r '.access_token') curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" https://mockpass.app.airbase.sg/v2/oauth/userinfo
Expected behavior
Mockpass should support testing with non-Singapore address, so it should do whatever sgID does with non-Singapore addresses. Presumably that is to return a non-error response containing some string for the registered address? (I have no idea what sgID actually does in this case. Hopefully it does not also return an error?)
Additional context
Log message:
The text was updated successfully, but these errors were encountered: