From 13aa1895032e530960edff79fb8c44c5d7e7f18e Mon Sep 17 00:00:00 2001 From: JaneYU <28294210+zheyu1991@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:58:41 +0800 Subject: [PATCH] fix: Update assertions.js to support SFA (#681) --- lib/assertions.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/assertions.js b/lib/assertions.js index 1ba6d176..bd9ecd2d 100644 --- a/lib/assertions.js +++ b/lib/assertions.js @@ -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')