Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Support application factories #133

Open
ikreb7 opened this issue Aug 26, 2021 · 1 comment
Open

Feature request: Support application factories #133

ikreb7 opened this issue Aug 26, 2021 · 1 comment
Labels

Comments

@ikreb7
Copy link

ikreb7 commented Aug 26, 2021

It would be nice if you could support application factories. Then would be this possible:

from flask_httpauth import HTTPBasicAuth

auth = HTTPBasicAuth()

def create_app():
    app = Flask(__name__)
    auth.init_app(app)
@miguelgrinberg
Copy link
Owner

This extension does not require any arguments, not even the app instance, so you can use it with app factory style applications just fine. There is no need to call init_app, not because there is no support for it, but because there is nothing to initialize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants