auth0-samples/auth0-python-api-samples

Set error handler without public APP variable

estebancortero opened this issue · 1 comments

In the example, the flask app is a public variable APP, which is used to set the error handler in the decorator:

@APP.errorhandler(AuthError)
def handle_auth_error(ex):
  ...

What's the best way to do this if I don't have a public APP variable for my Flask app but instead an app factory function create_app, which returns the app?

Apologies not receiving a response - @estebancortero were you able to figure this out? Given the age of this issue I'm going to close it, but if you are still experiencing this issue, please reopen.