I have finished the feature of user account create&login, and tested the changes locally. They work as expected.
Users input their username, email and password, and they can register/log in.
When the username already exists in the database, it's login, otherwise it's register. Either wrong password or email prevents users from logging in. When they log in/register successfully, they will be redirected to the homepage.
There is a database called 'app.db', which includes two tables:'user' and 'login_history'. The user information is stored in the 'user' table while 'login_history' stores the login/logout time record. I have already added some test data(password is as same as the username).
Everyone can run 'app.py' and test it. If you have any ideas, please comment below. Cheers!
Hi guys,
I have finished the feature of user account create&login, and tested the changes locally. They work as expected.
Users input their username, email and password, and they can register/log in.
When the username already exists in the database, it's login, otherwise it's register. Either wrong password or email prevents users from logging in. When they log in/register successfully, they will be redirected to the homepage.
There is a database called 'app.db', which includes two tables:'user' and 'login_history'. The user information is stored in the 'user' table while 'login_history' stores the login/logout time record. I have already added some test data(password is as same as the username).
Everyone can run 'app.py' and test it. If you have any ideas, please comment below. Cheers!