From 28c3f28e01abeb2c2b9bb72020fe3675929d8c59 Mon Sep 17 00:00:00 2001 From: Maksim Eltyshev Date: Sat, 9 Dec 2023 16:28:24 +0100 Subject: [PATCH] fix: Add issuer to OIDC callback parameters Closes #562 --- server/api/helpers/users/get-or-create-one-using-oidc.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server/api/helpers/users/get-or-create-one-using-oidc.js b/server/api/helpers/users/get-or-create-one-using-oidc.js index 6a862022c..6d1c49f04 100644 --- a/server/api/helpers/users/get-or-create-one-using-oidc.js +++ b/server/api/helpers/users/get-or-create-one-using-oidc.js @@ -24,8 +24,13 @@ module.exports = { try { const tokenSet = await client.callback( sails.config.custom.oidcRedirectUri, - { code: inputs.code }, - { nonce: inputs.nonce }, + { + iss: sails.config.custom.oidcIssuer, + code: inputs.code, + }, + { + nonce: inputs.nonce, + }, ); userInfo = await client.userinfo(tokenSet); } catch (e) {