Hi,
I try to use the EsiPy to authenticate a user and grab information from the API.
I use flask as an application server when I tried to log one of my characters I receives the following error message :
Login EVE Online SSO failed: HTTP Error 400: b’{“error”:“invalid_grant”,“error_description”:“Grant type authorization_code is not supported.”}’
The error message comes when I try to obtain a token when I have obtained authorization code.
below the code extract :
@app.route(’/sso/callback’)
def callback():
“”" This is where the user comes after he logged in SSO “”"
# get the code from the login process
#redirect_uri, scopes, token = extract_state_token(request.args.get(‘state’))
code = request.args.get(‘code’)
token = request.args.get(‘state’)
# compare the state with the saved token for CSRF check
sess_token = session.pop(‘token’, None)
if sess_token is None or token is None or token != sess_token:
return ‘Login EVE Online SSO failed: Session Token Mismatch’, 403
app.logger.info(code)
# now we try to get tokens
try:
auth_response = esisecurity.auth(code)
except APIException as e:
return ’ je suis là : Login EVE Online SSO failed: %s’ % e, 403
The error is coming in the last exception when I call :
auth_response = esisecurity.auth(code)
Thanks in advance for your help
Mirailla