flask-jwt

Internal Redirect in Flask

女生的网名这么多〃 提交于 2020-12-03 07:34:50
问题 In short: By only using the Flask micro-framework (and its dependencies) can we perform an internal redirect from one route to another? For example: User submits the registration form (both username and password ) to @app.route('/register', methods=['POST']) If the registration is successful, Flask internally does an HTTP POST to @app.route('/login', methods['POST']) passing the username and password Process and log in the user Details: I am building a REST API using Flask and the Flask-JWT

Internal Redirect in Flask

荒凉一梦 提交于 2020-12-03 07:33:11
问题 In short: By only using the Flask micro-framework (and its dependencies) can we perform an internal redirect from one route to another? For example: User submits the registration form (both username and password ) to @app.route('/register', methods=['POST']) If the registration is successful, Flask internally does an HTTP POST to @app.route('/login', methods['POST']) passing the username and password Process and log in the user Details: I am building a REST API using Flask and the Flask-JWT

Flask JWT Extended “The specified alg value is not allowed” Error

让人想犯罪 __ 提交于 2020-01-24 01:16:07
问题 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 navigating to the (frontend) route that calls the request: this.axios.get("/jobs").then(res => { console.log(res.data); this.jobs = res.data.jobs; }); in the same go, it works as expected, however on refresh it then shows the 422 error. I store the token