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

Document how to use --auth_provider for a custom LoginHandler #1344

Open
smcl opened this issue Dec 15, 2023 · 2 comments
Open

Document how to use --auth_provider for a custom LoginHandler #1344

smcl opened this issue Dec 15, 2023 · 2 comments

Comments

@smcl
Copy link

smcl commented Dec 15, 2023

Is your feature request related to a problem? Please describe.
If we are not merging any new login providers, could there please be some documentation added that describes exactly how to specify a non-Flower login provider via --auth_provider"..."

Describe the solution you'd like
Yesterday I opened a PR to merge Auth0 support, before closing it after I saw someone else had done something the same and it got rejected. I've been playing with the suggested approach, implementing the login handler in my application rather than in Flower itself.

However I've had a bit of trouble with this so far - I can't get my handler to be recognised. I get ModuleNotFoundError: No module named '...' (for various values of "...") when I try to access the Flower login page. To demonstrate what I mean, I've got a super-basic app over @ https://github.com/smcl/flower-login-provider-issue - I have a simple Auth0LoginProvider in auth0.py that I can't really get working with Flower.

If you're not accepting additional login providers in-repo, could you provide a simple example in the project's documentation demonstrating how we can accomplish this ourselves? I don't imagine I'm the only one who had issues with this.

@smcl
Copy link
Author

smcl commented Dec 15, 2023

Just realised my example is missing an __init__.py at the top-level, using --auth_provider="auth0.Auth0LoginProvider" with that file present works. I think it might still be worth having an example referenced somewhere. Let me know if you agree, I can put together a PR to include a bit of information in the docs/auth.rst file.

@mher
Copy link
Owner

mher commented Dec 15, 2023

It would be great if you could document how to use flower with custom auth providers, thanks!

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

No branches or pull requests

2 participants