Skip to content

Commit

Permalink
Merge pull request #1215 from jembi:sso-issuer-fix
Browse files Browse the repository at this point in the history
Add optional Openid connect provider issuer url to config and update passport.js to use it
  • Loading branch information
rcrichton authored Nov 16, 2023
2 parents 3b9a686 + 0e6267b commit c9eceb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions config/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ The following config option are provided by the OpenHIM. All of these options ha
"openid": {
// Openid connect provider realm url link
"url": "http://localhost:9088/realms/platform-realm",
// (Optional) Openid connect provider issuer url incase this is different from the api url e.g. if you are using a proxy
"issuerUrl": "http://localhost:9088/realms/platform-realm",
// Callback URL used by openid connect provider (should be the same callback URL specified in realm)
"callbackUrl": "http://localhost:9000",
// CLient ID specified in the realm
Expand Down
2 changes: 1 addition & 1 deletion src/passport.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ passport.loadStrategies = function () {
openid: {
strategy: passportOpenid.Strategy,
options: {
issuer: openidConfig.url,
issuer: openidConfig.issuerUrl || openidConfig.url,
authorizationURL: `${openidConfig.url}/protocol/openid-connect/auth`,
tokenURL: `${openidConfig.url}/protocol/openid-connect/token`,
userInfoURL: `${openidConfig.url}/protocol/openid-connect/userinfo`,
Expand Down

0 comments on commit c9eceb2

Please sign in to comment.