From a0d2132e5b3c8a47c4d2a2ec9d4233127ad0214c Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Fri, 31 May 2019 14:07:46 +0200 Subject: [PATCH] Fix oauth2 to pass a type parameter when requesting authorization * oauth2.el (oauth2-request-authorization): Add a "type=user_agent" parameter to the URL as it seems to be required by the protocol: https://tools.ietf.org/html/draft-ietf-oauth-v2-05#section-3.5.1 --- oauth2.el | 1 + 1 file changed, 1 insertion(+) diff --git a/oauth2.el b/oauth2.el index c8807f3..f6438ba 100644 --- a/oauth2.el +++ b/oauth2.el @@ -48,6 +48,7 @@ (defun oauth2-request-authorization (auth-url client-id &optional scope state re (if (string-match-p "\?" auth-url) "&" "?") "client_id=" (url-hexify-string client-id) "&response_type=code" + "&type=user_agent" "&redirect_uri=" (url-hexify-string (or redirect-uri "urn:ietf:wg:oauth:2.0:oob")) (if scope (concat "&scope=" (url-hexify-string scope)) "") (if state (concat "&state=" (url-hexify-string state)) ""))) -- 2.21.0