fix(TALE-31): use oidc variables first over config
This commit is contained in:
parent
5a46fd0a97
commit
a2054786f8
1 changed files with 10 additions and 0 deletions
|
|
@ -224,6 +224,16 @@ async function checkOidc(config?: HeadscaleConfig) {
|
|||
throw new Error('OIDC environment variables are incomplete')
|
||||
}
|
||||
|
||||
if (issuer && client && secret) {
|
||||
return {
|
||||
issuer,
|
||||
client,
|
||||
secret,
|
||||
rootKey,
|
||||
disableKeyLogin,
|
||||
}
|
||||
}
|
||||
|
||||
if ((!issuer || !client || !secret) && config) {
|
||||
issuer = config.oidc?.issuer
|
||||
client = config.oidc?.client_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue