Skip to content

Commit

Permalink
Update src/load-config.js
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
lelemm and coderabbitai[bot] authored Nov 11, 2024
1 parent f0d45e3 commit f9c4175
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/load-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,22 @@ const finalConfig = {
const baseConfig = process.env.ACTUAL_OPENID_DISCOVERY_URL
? { issuer: process.env.ACTUAL_OPENID_DISCOVERY_URL }
: {
...(() => {
const required = {
authorization_endpoint: process.env.ACTUAL_OPENID_AUTHORIZATION_ENDPOINT,

Check failure on line 159 in src/load-config.js

View workflow job for this annotation

GitHub Actions / lint

Insert `⏎···············`
token_endpoint: process.env.ACTUAL_OPENID_TOKEN_ENDPOINT,
userinfo_endpoint: process.env.ACTUAL_OPENID_USERINFO_ENDPOINT,
};
const missing = Object.entries(required)
.filter(([_, value]) => !value)
.map(([key]) => key);
if (missing.length > 0) {
throw new Error(
`Missing required OpenID configuration: ${missing.join(', ')}`

Check failure on line 168 in src/load-config.js

View workflow job for this annotation

GitHub Actions / lint

Insert `,`
);
}
return {};
})(),
issuer: {
name: process.env.ACTUAL_OPENID_PROVIDER_NAME,
authorization_endpoint:
Expand Down

0 comments on commit f9c4175

Please sign in to comment.