fix(TALE-31): use oidc variables first over config
This commit is contained in:
parent
5a46fd0a97
commit
a2054786f8
@ -224,6 +224,16 @@ async function checkOidc(config?: HeadscaleConfig) {
|
|||||||
throw new Error('OIDC environment variables are incomplete')
|
throw new Error('OIDC environment variables are incomplete')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (issuer && client && secret) {
|
||||||
|
return {
|
||||||
|
issuer,
|
||||||
|
client,
|
||||||
|
secret,
|
||||||
|
rootKey,
|
||||||
|
disableKeyLogin,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((!issuer || !client || !secret) && config) {
|
if ((!issuer || !client || !secret) && config) {
|
||||||
issuer = config.oidc?.issuer
|
issuer = config.oidc?.issuer
|
||||||
client = config.oidc?.client_id
|
client = config.oidc?.client_id
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user