opened 09:05PM - 17 Aug 17 UTC
closed 04:59PM - 18 Aug 17 UTC
## Summary
The problem that I am having is showing up after user enters their… credentials at the Auth0's lock screen. When I looked at Auth0 Dashboard's log section I can see users can login successfully ( I see both Success Exchange, Success Login ). Then call back function is triggering the callback call. At that point production and test(localhost) environments differs from each other.
In localhost I can see the status code 302 Found status code on the localhost but not in the production server. In production server I am seeing the status code 500 INTERNAL SERVER ERROR.
When I checked the server side I saw it was failing at the token line of the callback function
```
@app.route('/callback')
def callback_handling():
code = request.args.get('CODE_KEY')
get_token = GetToken('AUTH0_DOMAIN')
auth0_users = Users('AUTH0_DOMAIN')
token = get_token.authorization_code('AUTH0_CLIENT_ID'], ['AUTH0_CLIENT_SECRET', code, 'AUTH0_CALLBACK_URL') # FAILING HERE #
user_info = auth0_users.userinfo(token['access_token'])
.....
...
..
return redirect('/some_path')
```
When I checked the credentials they all look what they are supposed to be. So in the server logs I am seeing this keywords in the servers.
```
ERROR in app: Exception on /callback
raise SSLError(e, request=request)
SSLError: HTTPSConnectionPool(host='my_domain.auth0.com', port=443): Max retries exceeded with url: /oauth/token (Caused by SSLError(SSLError('bad handshake: SysCallError(0, None)',),))
```
I am thinking server might be rejecting the certificate or something and after seeing [this link](https://github.com/rackspace/pyrax/issues/601) thought opening issue might be helpful.
Ubuntu 16.04, Python 2.7.12, certifi 2017.7.27.1
## Expected Result
In the callback function returns token
` token = get_token.authorization_code('AUTH0_CLIENT_ID', 'AUTH0_CLIENT_SECRET', code, 'AUTH0_CALLBACK_URL') `
## Actual Result
`SSLError: HTTPSConnectionPool(host='my_domain.auth0.com', port=443): Max retries exceeded with url: /oauth/token (Caused by SSLError(SSLError('bad handshake: SysCallError(0, None)',`
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.2.3"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.12"
},
"platform": {
"release": "3.13.0-43-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1000207f",
"version": "0.15.1"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).