diff --git a/cmd/ek/main.go b/cmd/ek/main.go index d7dbe81..277464f 100644 --- a/cmd/ek/main.go +++ b/cmd/ek/main.go @@ -109,9 +109,10 @@ func main() { log.Fatal(err) } + clientID := "https://p83.nl/microsub-client" scope := "read follow mute block channels" - token, err := indieauth.Authorize(me, endpoints, scope) + token, err := indieauth.Authorize(me, endpoints, clientID, scope) if err != nil { log.Fatal(err) } diff --git a/pkg/indieauth/auth.go b/pkg/indieauth/auth.go index fba3584..c907945 100644 --- a/pkg/indieauth/auth.go +++ b/pkg/indieauth/auth.go @@ -55,7 +55,7 @@ func GetEndpoints(me *url.URL) (Endpoints, error) { return endpoints, nil } -func Authorize(me *url.URL, endpoints Endpoints, scope string) (TokenResponse, error) { +func Authorize(me *url.URL, endpoints Endpoints, clientID, scope string) (TokenResponse, error) { var tokenResponse TokenResponse authURL, err := url.Parse(endpoints.AuthorizationEndpoint) @@ -68,7 +68,6 @@ func Authorize(me *url.URL, endpoints Endpoints, scope string) (TokenResponse, e return tokenResponse, err } - clientID := "https://p83.nl/microsub-client" local := ln.Addr().String() redirectURI := fmt.Sprintf("http://%s/", local) state := "12345344"