mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
18 lines
404 B
Go
18 lines
404 B
Go
package delegatedauth
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/zitadel/oidc/v2/pkg/client/rp"
|
|
"go.uber.org/fx"
|
|
)
|
|
|
|
func Module() fx.Option {
|
|
return fx.Options(
|
|
fx.Provide(func(cfg Config, httpClient *http.Client) (rp.RelyingParty, error) {
|
|
return rp.NewRelyingPartyOIDC(cfg.Issuer, cfg.ClientID, cfg.ClientSecret, cfg.RedirectURL, []string{"openid email"},
|
|
rp.WithHTTPClient(httpClient))
|
|
}),
|
|
)
|
|
}
|