Skip to content

Commit

Permalink
fix: Update assertions.js to support SFA (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
zheyu1991 authored Aug 26, 2024
1 parent d8fc905 commit 13aa189
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')){

Check failure on line 139 in lib/assertions.js

View workflow job for this annotation

GitHub Actions / CI

Replace `(nric.startsWith('Y'))` with `·(nric.startsWith('Y'))·`
sub = `s=${nric},fid='G730Z-H5P96',coi='DE',u=${uuid}`

Check failure on line 140 in lib/assertions.js

View workflow job for this annotation

GitHub Actions / CI

Delete `················`
}else{

Check failure on line 141 in lib/assertions.js

View workflow job for this annotation

GitHub Actions / CI

Replace `else{·` with `·else·{`
sub = `s=${nric},u=${uuid}`
}
const accessTokenHash = hashToken(accessToken)

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

0 comments on commit 13aa189

Please # to comment.