Skip to content

Commit

Permalink
fix: Update assertions.js to support SFA
Browse files Browse the repository at this point in the history
  • Loading branch information
zheyu1991 committed Aug 23, 2024
1 parent 28f06b3 commit 692f732
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/assertions.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,12 @@ const oidc = {
nonce,
accessToken = crypto.randomBytes(15).toString('hex'),
) => {
const sub = `s=${nric},u=${uuid}`

let sub
if(nric.startsWith('Y')){
sub = `s=${nric},fid='G730Z-H5P96',coi='DE',u=${uuid}`
}else{
sub = `s=${nric},u=${uuid}`
}
const accessTokenHash = hashToken(accessToken)

const refreshToken = crypto.randomBytes(20).toString('hex')
Expand Down

0 comments on commit 692f732

Please # to comment.