Is it possible to use variables or secrets with the OAuth configuration? I’m trying to use a git branch for development and a different git branch for production, and our OAuth configuration settings are different between the two.
Add a secret string variable on the server. Setup the OpenID (or OAuth should work the same way) in authentication.ps1:
$Parameters = @{
Type = "OpenIDConnect"
CallbackPath = "/auth/signin-oidc"
ClientId = "<application guid here>"
Authority = "https://login.microsoftonline.com/<tenant ID here>"
ClientSecret = $Secret:OpenIDSecret # Or whatever you called your variable
}
Set-PSUAuthenticationMethod @Parameters
I had troubles in the past getting that to work. I completely wiped my database and restarted from scratch with the latest version, above code now works for me.