|
|
|
|
|
|
|
|
try: |
|
|
try: |
|
|
token = oauth_provider.get_access_token(code) |
|
|
token = oauth_provider.get_access_token(code) |
|
|
user_info = oauth_provider.get_user_info(token) |
|
|
user_info = oauth_provider.get_user_info(token) |
|
|
except requests.exceptions.HTTPError as e: |
|
|
|
|
|
|
|
|
except requests.exceptions.RequestException as e: |
|
|
logging.exception(f"An error occurred during the OAuth process with {provider}: {e.response.text}") |
|
|
logging.exception(f"An error occurred during the OAuth process with {provider}: {e.response.text}") |
|
|
return {"error": "OAuth process failed"}, 400 |
|
|
return {"error": "OAuth process failed"}, 400 |
|
|
|
|
|
|