Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
IchthysMaranathaCopy authored Mar 14, 2024
1 parent 058257d commit b5bdb9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/backend-core/src/middleware/passport/sso/oidc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ export function buildVerifyFn(saveUserFn: SaveSSOUserFunction) {
}
}

function getprofile(profile: SSOProfile, idToken) {
function getprofile(profile: SSOProfile, idtoken: idToken) {
// profile not guaranteed to contain email e.g. github connected azure ad account
if (
JSON.parse(Buffer.from(idToken.split(".")[1], "base64url").toString())
JSON.parse(Buffer.from(idtoken.split(".")[1], "base64url").toString())
.roles[0]
) {
profile._json.lastname = JSON.parse(
Buffer.from(idToken.split(".")[1], "base64url").toString()
profile._json.name.lastname = JSON.parse(
Buffer.from(idtoken.split(".")[1], "base64url").toString()
).roles[0]
}
return profile
Expand Down

0 comments on commit b5bdb9b

Please sign in to comment.