23 lines
350 B
Go
Raw Normal View History

2021-09-08 12:17:44 +02:00
package service
import (
"github.com/photoprism/photoprism/internal/oidc"
"sync"
)
var onceOidc sync.Once
func initOidc() {
services.Oidc = oidc.NewClient(
Config().OidcIssuerUrl(),
Config().OidcClientId(),
Config().OidcClientSecret(),
Config().SiteUrl(),
)
}
func Oidc() *oidc.Client {
onceOidc.Do(initOidc)
return services.Oidc
}