fix: API_KEY is no longer required for login to work
This commit is contained in:
parent
a57e777a6b
commit
a63f4e4d52
8 changed files with 39 additions and 18 deletions
|
|
@ -233,6 +233,7 @@ async function getOidcConfig() {
|
|||
let issuer = process.env.OIDC_ISSUER
|
||||
let client = process.env.OIDC_CLIENT_ID
|
||||
let secret = process.env.OIDC_CLIENT_SECRET
|
||||
const rootKey = process.env.API_KEY
|
||||
|
||||
if (!issuer || !client || !secret) {
|
||||
const config = await getConfig()
|
||||
|
|
@ -250,6 +251,10 @@ async function getOidcConfig() {
|
|||
return
|
||||
}
|
||||
|
||||
if (!rootKey) {
|
||||
throw new Error('Cannot use OIDC without the root API_KEY variable set')
|
||||
}
|
||||
|
||||
return { issuer, client, secret }
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue