From 75450fbc8218473eafa7e8550980626a1c12a4b8 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Tue, 9 Oct 2018 17:28:47 -0400 Subject: [PATCH] override response_type=id for IndieAuth providers this avoids requesting an access token since we are just trying to authenticate, not trying to authorize. see https://indieauth.spec.indieweb.org/#authentication for details --- handlers/handlers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handlers/handlers.go b/handlers/handlers.go index a2ced701..1ec48f98 100644 --- a/handlers/handlers.go +++ b/handlers/handlers.go @@ -107,6 +107,8 @@ func loginURL(r *http.Request, state string) string { } } url = oauthclient.AuthCodeURL(state, oauthopts) + } else if genOauth.Provider == "indieauth" { + url = oauthclient.AuthCodeURL(state, oauth2.SetAuthURLParam("response_type", "id")) } else { url = oauthclient.AuthCodeURL(state) }