feat(http): add IssuerBase method for account site redirect
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user