Closed engmsilva closed 4 years ago
Make sure you set the JWT_TOKEN_LOCATION option accordingly For example, app.config[‘JWT_TOKEN_LOCATION’] = [‘headers’, ‘query_string’]
@vimalloc Thanks for the feedback. Below are my settings, but it seems that only token by header is being accepted.
app.config['JWT_TOKEN_LOCATION'] = ['headers', 'query_string']
app.config['JWT_SECRET_KEY'] = os.getenv("JWT_SECRET_KEY")
app.config['JWT_BLACKLIST_ENABLED'] = True
jwt = JWTManager(app)
Please disregard the previous answer when adding the settings:
app.config['JWT_TOKEN_LOCATION'] = ['headers', 'query_string']
The token for the string query worked.
Thank you @vimalloc
Awesome, glad to hear it :+1:
"msg": "Missing JWT in headers or query_string (Missing Authorization Header; Missing 'jwt' query paramater)" i got this error in the process
"msg": "Missing JWT in headers or query_string (Missing Authorization Header; Missing 'jwt' query paramater)" i got this error in the process
I have the same error
I can retrieve the token identity value when sent by the postman header.
However when I use string query is returning the error message:
api/protected?jwt=<access_token>
My recovery code looks like this:
I'm using flask_restful to do routing.
Is there anything else that should be parameterized?