Skip to content

Commit

Permalink
Merge pull request #29 from bcgov/ofmcc-549-send-bceid-username
Browse files Browse the repository at this point in the history
Updated so when bceid singin, the username is sent to the backend
  • Loading branch information
jgstorey authored Nov 3, 2023
2 parents 82dc419 + 5e05045 commit 6139406
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend/src/components/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ async function getUserInfo(req, res) {
return res.status(HttpStatus.OK).json(resData)
}
} else {
//Not an idir user, so just get the guid from the header
log.verbose('User Guid is: ', userGuid)
userResponse = await getUserProfile(userGuid, null)
// This is a BCeID user: if the userGuid cannot be found in dyanmics, then dyanmics will check if the userName exists,
// if userName exists but has a null userGuid, the system will update the user record with the GUID and return that user profile.
log.verbose('BCEID User guid: ' + userGuid + ' username: ' + userName)
userResponse = await getUserProfile(userGuid, userName)
}

if (log.isVerboseEnabled) {
Expand Down

0 comments on commit 6139406

Please sign in to comment.