Questions tagged [flask-jwt-extended]

Flask-JWT-Extended is an opinionated Flask extension that adds support for using JSON Web Tokens (JWT) to protect views. It also many helpful (and optional) features built in to make working with JSON Web Tokens easier.

143 questions
0
votes
1 answer

Flask JWT Extended returned identity as id instead of email

My Flask app i made is using flask-jwt-extended for JWT auth. As i followed this tutorial, i added email as indentity when created access token right here: class ApiLogin(Resource): def post(self): data = loginParser.parse_args() …
Vicky Sultan
  • 73
  • 2
  • 15
0
votes
1 answer

How can I add Authorization header to a request so that a flask route with @jwt_required can be access if access token is present on the headers

I'm trying to implement flask_jwt_extended to my flask app. My Use Case is, I want to set Authorization headers to every request. So that when a @jwt_required decorator is decorated to a flask route it can be access if an access token is present on…
0
votes
1 answer

How to use jwt refresh tokens

I am working with python flask_jwt_extended to handle jwt. I have a refresh endpoint (from the docs) as follows: # The jwt_refresh_token_required decorator insures a valid refresh # token is present in the request before calling this endpoint. We #…
msche
  • 66
  • 9
0
votes
1 answer

Send post request with flask_jwt_extended

I am trying to send a post request to a Flask server that uses flask_jwt_extended tokens. I don’t want the page to refresh after each submit and I managed to do this using jquery. But I am unable to send CSRF token in a way that flask_jwt_extended…
msche
  • 66
  • 9
0
votes
1 answer

verify_jwt_in_request() returns None when called in custom Flask Decorator

I am trying to create a custom decorator that makes use of verify_jwt_in_request() from the flask-jwt-extended library. My code is laid out as below: @app.route("/test-auth", methods=["POST"]) @custom_auth_required def test_auth(): …
lordlabakdas
  • 1,163
  • 5
  • 18
  • 33
0
votes
1 answer

flask_jwt_extended exceptions NoAuthorizationError

I am building the flask app using the flask restful. For generating the access token am using the flask_jwt_extended module. Am able to generate the access_token ,refresh_token, But while accessing the API it is throwing the below error, am passing…
chatrapathi
  • 107
  • 8
0
votes
1 answer

Persist cookies on page reload of Vue SPA

I am creating a simple SPA with a Vue frontend and Python API using Flask. Currently, I have everything configured on my local machine (API running at localhost:5000 and Vue SPA accessible at localhost:8080). I am using flask-jwt-extended to manage…
walshbm15
  • 113
  • 1
  • 11
0
votes
0 answers

Is there a way to intercept a 401 status code from flask_jwt_extended and return this value?

So I have a JWT token being generated and after 10 minutes it expires. Once it expires, I want to be able to catch this 401 error code. I am using flask_jwt_extended library. This is my code: @dossier_blueprint.route("/week",…
0
votes
1 answer

Storing JWT tokens externally in Flask-JWT-Extended

I have a Flask app running in AWS using Flask-JWT-Extended. It is serving REST API calls to a web app. As I understand from the documentation, the tokens are generated and stored in memory. I am considering storing them external to the Flask app…
Paul Waldo
  • 1,131
  • 10
  • 26
0
votes
1 answer

Route53 route subdomain to AWS Lambda getting 404

I have a domain in aws route53. My frontend is routed to that domain from cloudfront via alias and works perfectly. My backend sits on aws lambda and I want to put it behind my domain so my users can authorize using jwt cookies. I created…
0
votes
1 answer

How to put auth functionality in @app.before_request in flask

I want to make auth layer in flask app . I was using flask-jwt-extended for jwt auth so for that i have to mentioned @jwt_requied decorator for each protected route . so i dont want to do that for each protected route. I thought to define a function…
VVK kumar
  • 267
  • 3
  • 5
  • 15
0
votes
2 answers

Flask JWT Extended "The specified alg value is not allowed" Error

When making a request to a flask route that requires a JWT to access using (@jwt_required decorator on flask-restful resources), I get a 422 UNPROCESSABLE ENTITY with the message: The specified alg value is not allowed. When logging in and…
TomHill
  • 614
  • 1
  • 10
  • 26
0
votes
0 answers

Best practices for user authentication for combined web app and api

I'm working on a flask web application using flask-login for user authentication. Now the current layout is going through some changes and it was decided that some of the components should obtain data from the server in order to update on user…
0
votes
1 answer

Allow JWT Tokens if Expired, Provided User is from Trusted IP address

Using flask-jwt-extended, I have a situation where the API has to serve both users, and also a series of web-applications (for example, one of the latter is a chatbot). For the users, the package functionality out of the box is just perfect,…
Nicholas Hamilton
  • 10,044
  • 6
  • 57
  • 88
0
votes
2 answers

How to use a jwt from a different issuer?

I am building an flask API that will manipulate data to be used in thingsboard. Long story short, client logs in via thingsboard, get a jwt from that. But the API rejects the jwt saying that signature verification failed. Same secret key is being…
JonYork
  • 1,223
  • 8
  • 31
  • 52
1 2 3
9
10