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-foal.git

commit 615f60a7380111f7951a70bc0cca28c9a847a0d2
Author: Daniel Gruno <[email protected]>
AuthorDate: Tue Sep 8 10:28:56 2020 +0200

    harmonize, fix comment
---
 server/endpoints/oauth.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/endpoints/oauth.py b/server/endpoints/oauth.py
index 3fd2068..929e2c9 100644
--- a/server/endpoints/oauth.py
+++ b/server/endpoints/oauth.py
@@ -41,10 +41,10 @@ async def process(
     rv: typing.Optional[dict] = None
 
     # Google OAuth - currently fetches email address only
-    if oauth_token and oauth_token.startswith("https://www.googleapis.com/";) 
and id_token:
+    if indata.get('key', '') == 'google' and id_token:
         rv = await plugins.oauthGoogle.process(indata, session, server)
 
-    # GitHub OAuth - currently fetches email address only
+    # GitHub OAuth - Fetches name and email
     if indata.get('key', '') == 'github' and code:
         rv = await plugins.oauthGithub.process(indata, session, server)
 

Reply via email to