Dash App Pages with Flask Login Flow using Flask

Hello @JordyS,

Sure thing.

For this, query the users db into a dataframe, set the index as the username and then convert to a dictionary.

If it isn’t this, it should be close.

Edit:
You will probably need to change the password lookup to pull from the password key as well.

Another thing to note with sql, you should never take user inputs directly into a sql string. That can lead to sql injection attacks.

Hi,

With your example, how to add a reset_password page in dash, and the reset-button may hold in the login page or hold in the page that mentioned the username/password is invalid?

Hi @jinnyzor ,

With your example, how to add a reset_password page in dash, and the reset-button may hold in the login page or hold in the page when the username/password is invalid

Hello @beginof,

What exactly do you mean by hold in the login page? You mean, not navigate away?

Which iteration are you using? A Dash layout for the login screen, or the flask template for the login screen?

Hi @jinnyzor,

I’m using the login page as same as your example.

In current version, the login page, it will have username-input-box, follow by the password-input-box and a clickable login-button. When user click the login-button, it will redirect to the home page if username and password matched.

In the next version, can add one more clickable button called reset-button ? which will perform to reset / change the password and able to update the new password to database. When user click the reset-button, it will redirect to the reset page, which contain username-input-box, current-password-input-box, new-password-input-box, confirm-password-input-box and a clickable submit-button. Once user click the submit-button, the new password will replace and update in the database, and redirect to the login page.

HI @jinnyzor,

May I know how to create a change password page which able to perform change password and update the new password to database.

current password > new password > confirm password > submit btn

these would be great adds on the template. I would also suggest the a “Join” button for new users. I tried to include it as modal in the login.py (with username, password and confirm password) but it does not trigger the @callback, not sure where is best to include it