The Simplest Login System in Flask: HTTP Basic Auth
HTML-код
- Опубликовано: 20 окт 2024
- Implement the most simple login for your Flask app by using HTTP basic auth. It will only take a few lines of code to protect pages on your app.
Build Better Apps, Faster In Only 4 Minutes👇🏼
prettyprinted....
💻 Code written in video
prettyprinted....
Is it possible to do this in another way other than sending a notification? (my organization blocks those)
Great video, huge thumbs up 👍🏻👍🏻. I just have one question, how do i pass the credentials if i wanted to test the api using Postman or Rested extension(Chrome browser)?
I get ImportError: attempted relative import with no known parent package when trying to import my own library.
Also, not sure where you found those env files.
You'll need to have a __init__.py file. Also, you can create your own .env file
Any clues as to why the .env variables dont get picked up? Great Video mate
hw do i do it for app which is running on production?
Would you use basic auth or OAuth2 secure webhooks?
Basic auth when you want a very simple way to protect the pages of your app. I'm not sure what you mean by OAuth2 secure webhooks, but OAuth2 is much more complicated, so if your users want to use OAuth, then it may be worth implementing.
great video
Thanks for watching!