Tay0710 / CITS3403_Project

The repository for the CITS3403 Project.
0 stars 0 forks source link

Question about logging in twice #39

Closed livvy10 closed 4 months ago

livvy10 commented 5 months ago

In the tutorial if a user has already logged in, and then they try to access the login page, they get redirected to the home page. For our website, the login and home page are the same so what should happen? Here are three ideas:

  1. if logged in users visit home page, they are immediately redirected to the forum page (I don't think this one is good, I think they should be able to visit home even if there's not that much info / use there)
  2. they can go to the home page, and log in again (I think this one is fine - but is there any security issues with this? what if they are logged in as one user, and then try to log in as a different user? is this ok (will the first user be logged out and new user being logged in - or just new user logged in)?
  3. to avoid number 2, logged in users can only see the first part of the home page (we would block off the login form from them)

What do you guys reckon? or do you have any other suggestions?

Tay0710 commented 5 months ago

I think option 3 would be best. I agree, the user should always be able to access the home page of the website so not option 1. And I think option two is a bit weird to be able to continuously log in. So maybe we can look at adding a bit more to our home page and block the login form.

livvy10 commented 4 months ago

Option 3 has been implemented - now users cannot see login when viewing the home page if they have already logged in.