Skip to content

Commit

Permalink
override response_type=id for IndieAuth providers
Browse files Browse the repository at this point in the history
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
  • Loading branch information
aaronpk committed Oct 9, 2018
1 parent 4d29425 commit 75450fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions handlers/handlers.go
Expand Up @@ -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)
}
Expand Down

0 comments on commit 75450fb

Please sign in to comment.