flower icon indicating copy to clipboard operation
flower copied to clipboard

Document how to use `--auth_provider` for a custom LoginHandler

Open smcl opened this issue 2 years ago • 5 comments

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 avatar Dec 15 '23 10:12 smcl

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.

smcl avatar Dec 15 '23 11:12 smcl

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

mher avatar Dec 15 '23 16:12 mher