auth0

request.session.get('user') returning AnonymousUser when there is a user logged in

request.session.get('user') returning AnonymousUser when there is a user logged in Question: I am somewhat new at this so apologies in advance. I have run into a problem where I am using Auth0 with a custom db. I have created a user Profile model with a one-to-one relationship with User I am trying to allow the …

Total answers: 2

Use Auth0 decorator with Flask-RESTful resource

Use Auth0 decorator with Flask-RESTful resource Question: I need to use Auth0 for my Flask-RESTful app. Auth0 has an example using the requires_auth decorator on a view function. @app.route(‘/secured/ping’) @cross_origin(headers=[‘Content-Type’, ‘Authorization’]) @requires_auth def securedPing(): return "All good. You only get this message if you’re authenticated" With Flask-RESTful I use add_resource with a Resource class, not …

Total answers: 1