openid code refactoring

This commit is contained in:
2024-07-24 09:58:37 +02:00
parent 31e3cfab24
commit 9b61436a05
4 changed files with 105 additions and 59 deletions

View File

@@ -3,11 +3,16 @@ package openid
import (
"context"
"github.com/coreos/go-oidc"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/marcopeocchi/yt-dlp-web-ui/server/config"
"golang.org/x/oauth2"
)
var (
oauth2Config oauth2.Config
verifier *oidc.IDTokenVerifier
)
func Configure() {
if !config.Instance().UseOpenId {
return