You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2019/07/26 07:10:27 UTC
[incubator-ponymail] branch master updated: Fix OAuth
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail.git
The following commit(s) were added to refs/heads/master by this push:
new b9d599e Fix OAuth
b9d599e is described below
commit b9d599e14d6298bf4a845eb8decf774cfec9f2b3
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Jul 26 09:10:24 2019 +0200
Fix OAuth
Google has implemented some changes that meant Google OAuth stopped working. By changing the response_type request, we can make it work again. This fixes #500.
---
site/js/oauth.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/site/js/oauth.js b/site/js/oauth.js
index feef6f7..c47b67f 100644
--- a/site/js/oauth.js
+++ b/site/js/oauth.js
@@ -54,7 +54,7 @@ function oauthPortal(key) {
var state = parseInt(Math.random()*1000000000) + '' + parseInt(Math.random()*1000000000)
// google is different (as usual)
if (key == 'google') {
- location.href = ot.oauth_portal + "?state=" + state + "&client_id=" + (ot.client_id ? ot.client_id : "") + "&response_type=id_token&scope=email&redirect_uri=" + escape(window.location)
+ location.href = ot.oauth_portal + "?state=" + state + "&client_id=" + (ot.client_id ? ot.client_id : "") + "&response_type=code&scope=email&redirect_uri=" + escape(window.location)
} else {
var cid = ""
if (ot.construct) {
@@ -143,4 +143,4 @@ function oauthWelcome(args) {
window.sessionStorage.setItem("ponymail_redirect_oauth", document.referrer)
oauthOptions()
}
-}
\ No newline at end of file
+}