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 2021/06/03 10:08:11 UTC
[incubator-ponymail-foal] branch master updated: Only enable/use
github+google oauth if configured
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
The following commit(s) were added to refs/heads/master by this push:
new 72585a6 Only enable/use github+google oauth if configured
72585a6 is described below
commit 72585a69c85905ed326a777525d935077e91501d
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Thu Jun 3 12:07:55 2021 +0200
Only enable/use github+google oauth if configured
---
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 414c682..c3ecbda 100644
--- a/server/endpoints/oauth.py
+++ b/server/endpoints/oauth.py
@@ -39,11 +39,11 @@ async def process(
rv: typing.Optional[dict] = None
# Google OAuth - currently fetches email address only
- if indata.get("key", "") == "google" and id_token:
+ if indata.get("key", "") == "google" and id_token and server.config.oauth.google_client_id:
rv = await plugins.oauthGoogle.process(indata, session, server)
# GitHub OAuth - Fetches name and email
- if indata.get("key", "") == "github" and code:
+ if indata.get("key", "") == "github" and code and server.config.oauth.github_client_id:
rv = await plugins.oauthGithub.process(indata, session, server)
# Generic OAuth handler, only one we support for now. Works with ASF OAuth.