setup new provider endpoint creation

This commit is contained in:
2026-08-06 20:19:11 -04:00
parent fd12ba02fd
commit 793904e942
4 changed files with 10 additions and 6 deletions
+5 -1
View File
@@ -15,6 +15,10 @@ import (
var TestTokenStore TokenStore
func SetAuth() {
TestTokenStore = TokenStore{filePath: "token.json"}
}
func generateState() (string, error) {
b := make([]byte, 32)
if _, err := rand.Read(b); err != nil {
@@ -80,7 +84,7 @@ func HandleOAuth(authData webserver.OAuthAuthData) bool {
SameSite: http.SameSiteLaxMode,
})
url := OAuthConfigs[0].AuthCodeURL(
url := DefaultProvider.Config.AuthCodeURL(
state,
oauth2.S256ChallengeOption(verifier),
)