Expose OAuth2 errors, avoid redirect loop.

Closes #1775.
This commit is contained in:
Alexey Palazhchenko
2016-12-19 08:42:56 +03:00
parent b83a719e37
commit e259c64bac
7 changed files with 64 additions and 6 deletions

View File

@@ -218,6 +218,9 @@ func (c *Config) AuthCodeURL(state string) string {
if err != nil {
panic("AuthURL malformed: " + err.Error())
}
if err := url_.Query().Get("error"); err != "" {
panic("AuthURL contains error: " + err)
}
q := url.Values{
"response_type": {"code"},
"client_id": {c.ClientId},