From e6396819be931bcaf6a67c277316370e966f08cc Mon Sep 17 00:00:00 2001 From: Arnaud Ysmal Date: Sun, 7 Sep 2014 19:05:03 +0200 Subject: [PATCH] Add Dropbox to the providers not supporting Auth headers. Dropbox does not support mixing URL param and Auth header for authentication but the retrieveToken method forces the client_id to be sent in the URL param. --- oauth2.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oauth2.go b/oauth2.go index 739e73b..ec657a1 100644 --- a/oauth2.go +++ b/oauth2.go @@ -289,7 +289,8 @@ func providerAuthHeaderWorks(tokenURL string) bool { if strings.HasPrefix(tokenURL, "https://accounts.google.com/") || strings.HasPrefix(tokenURL, "https://github.com/") || strings.HasPrefix(tokenURL, "https://api.instagram.com/") || - strings.HasPrefix(tokenURL, "https://www.douban.com/") { + strings.HasPrefix(tokenURL, "https://www.douban.com/") || + strings.HasPrefix(tokenURL, "https://api.dropbox.com/") { // Some sites fail to implement the OAuth2 spec fully. return false }