FabienArcellier / writer-framework

No-code in the front, Python in the back. An open-source framework for creating data apps.
https://streamsync.cloud
Apache License 2.0
0 stars 1 forks source link

implement authentication workflow using basic auth #61

Closed FabienArcellier closed 3 months ago

FabienArcellier commented 3 months ago

For users who want to restrict access to their application for small application, I would like to implement a simple password restriction mechanism. What do you think about it ?

auth = auth.BasicAuth(
    login=os.get('LOGIN'),
    password=os.get('PASSWORD'),
    delay_after_failure=1, # limit attempt when authentication fail (avoid brute force)
    unauthorized_action # a route to show a dedicated page to unauthorize
    callback_func # callback where user can implement custom behavior on authorization
)

I plan to write a warning about unrecommended usage for critical application in the documentation.