openoakland / woeip

A platform for impacted communities to understand their local air quality and advocate for environmental justice.
https://woaq.org
MIT License
29 stars 16 forks source link

As a user, I should not be able to login when I already have an active session #447

Open TangoYankee opened 2 years ago

TangoYankee commented 2 years ago

Describe the bug Users can technically access the auth/login path when already logged in. This will replace their current credentials with new ones. These means the previous credentials will be lost and the associated session cannot be logged out.

To Reproduce Steps to reproduce the behavior:

  1. Go to ''/auth/login" path when already logged in
  2. Go through the sign in process

Expected behavior Going to the log screen when already logged in will redirect to another page, such as the about page.

Labels

Affected Components (For Developers) Login component

Technical Resources (For Developers) Should be able to access authToken context, and redirect when there is already a token present