diff options
author | zsloan | 2020-12-18 17:34:47 -0600 |
---|---|---|
committer | zsloan | 2020-12-18 17:34:47 -0600 |
commit | fc717c36d334f364bbae8c98f31ddf78e18d64e3 (patch) | |
tree | 3bc570a4c833187a414e3c7bc136bebce95f7920 /wqflask/wqflask | |
parent | 69f92ef2bc10477a80eff96fb7cc83fee11f31e8 (diff) | |
download | genenetwork2-fc717c36d334f364bbae8c98f31ddf78e18d64e3.tar.gz |
Added redirect_uri to the ORCID_AUTH_URL since it wasn't working due to missing this parameter
Diffstat (limited to 'wqflask/wqflask')
-rw-r--r-- | wqflask/wqflask/user_login.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/wqflask/wqflask/user_login.py b/wqflask/wqflask/user_login.py index b6266b2a..bc608e84 100644 --- a/wqflask/wqflask/user_login.py +++ b/wqflask/wqflask/user_login.py @@ -25,7 +25,7 @@ from utility.logger import getLogger logger = getLogger(__name__) from smtplib import SMTP -from utility.tools import SMTP_CONNECT, SMTP_USERNAME, SMTP_PASSWORD, LOG_SQL_ALCHEMY +from utility.tools import SMTP_CONNECT, SMTP_USERNAME, SMTP_PASSWORD, LOG_SQL_ALCHEMY, GN2_BRANCH_URL THREE_DAYS = 60 * 60 * 24 * 3 @@ -277,9 +277,11 @@ def orcid_oauth2(): data = { "client_id": ORCID_CLIENT_ID, "client_secret": ORCID_CLIENT_SECRET, - "grant_type": "authorization_code", + "grant_type": "authorization_code", + "redirect_uri": GN2_BRANCH_URL + "n/login/orcid_oauth2", "code": code } + result = requests.post(ORCID_TOKEN_URL, data=data) result_dict = json.loads(result.text.encode("utf-8")) |