Skip to content

Commit

Permalink
Add dedicated publish service url config #19
Browse files Browse the repository at this point in the history
  • Loading branch information
sroertgen committed Mar 4, 2024
1 parent 2c9ad68 commit 6f02f37
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ ES_USERNAME=
ES_PASSWORD=
ES_INDEX=skohub-reconcile

# URL of reconcile publish service
PUBLISH_SERVICE_URL=http://localhost:3030

# Authorization
WIKIMEDIA_AUTH_URL=https://meta.wikimedia.org/w/rest.php/oauth2/authorize
WIKIMEDIA_TOKEN_URL=https://meta.wikimedia.org/w/rest.php/oauth2/access_token
Expand Down
1 change: 1 addition & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const config = {
es_pass: process.env.ES_PASSWORD,
es_index: process.env.ES_INDEX,
reconcile_service_url: process.env.RECONCILE_SERVICE_URL,
publish_service_url: process.env.PUBLISH_SERVICE_URL,
wikimedia_auth_url: process.env.WIKIMEDIA_AUTH_URL,
wikimedia_token_url: process.env.WIKIMEDIA_TOKEN_URL,
wikimedia_id: process.env.WIKIMEDIA_ID,
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ passport.use("wikimedia", new OAuth2Strategy({
tokenURL: config.wikimedia_token_url,
clientID: config.wikimedia_id,
clientSecret: config.wikimedia_secret,
callbackURL: `${config.reconcile_service_url}/wiki/callback`
callbackURL: `${config.publish_service_url}/wiki/callback`
},
function(accessToken, refreshToken, profile, cb) {
const url = 'https://meta.wikimedia.org/w/api.php?action=query&meta=userinfo&format=json';
Expand All @@ -76,7 +76,7 @@ passport.use("orcid", new OAuth2Strategy({
tokenURL: config.orcid_token_url,
clientID: config.orcid_id,
clientSecret: config.orcid_secret,
callbackURL: `${config.reconcile_service_url}/orcid/callback`
callbackURL: `${config.publish_service_url}/orcid/callback`
},
function(accessToken, refreshToken, profile, cb) {
const url = config.orcid_getuser_url;
Expand Down

0 comments on commit 6f02f37

Please sign in to comment.