From 8f59f80eb2796b525692725ce37f274738e2764d Mon Sep 17 00:00:00 2001 From: Tueem Date: Wed, 24 Jun 2026 11:38:24 +0200 Subject: [PATCH] feat(http): add IssuerBase method for account site redirect --- internal/auth/oauth.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/internal/auth/oauth.go b/internal/auth/oauth.go index 905a669..596b92d 100644 --- a/internal/auth/oauth.go +++ b/internal/auth/oauth.go @@ -5,6 +5,7 @@ import ( "errors" "log" "net/http" + "net/url" "slices" "time" @@ -21,6 +22,17 @@ var ( authCookie string = "outfit-voting-abi26-auth" ) +func IssuerBaseURL() string { + urlstring := provider.Endpoint().AuthURL + + url, err := url.Parse(urlstring) + if err != nil { + return "" + } + url.Path = "/" + return url.String() +} + func InitProvider(issuer, id, secret, redirect string) error { ctx = context.Background() var err error