tattle-made / Uli

Software and Resources for Mitigating Online Gender Based Violence in India
https://uli.tattle.co.in
GNU General Public License v3.0
40 stars 29 forks source link

Browser Does not remember username and password #31

Closed dennyabrain closed 1 year ago

dennyabrain commented 2 years ago

Ambika reported that if she saves her username and login on firefox and tries to relogin using that credentials, it doesnt work. she has to relogin everytime.

dennyabrain commented 2 years ago

so, first of all I am not sure if its a browser bug or react bug, since this codebase is not well documented, i was hoping if someone could do some research on it and revert with how this can be fixed. The UI code for the login page is here - https://github.com/tattle-made/OGBV/blob/main/annotators/annotation-ui/src/pages/login.jsx we use Grommet for ui components.

dennyabrain commented 2 years ago

fyi, the code for the annotation UI is limited to the annotators folder of this repo. in the absence of documentation, setting up the backend without my assistance would require understanding of nodejs/express AND sequelize ORM so I am hoping this task can be fixed purely by making changes on the UI layer.

dennyabrain commented 2 years ago

and if that is not possible, then happy to schedule a call to go over setting this up locally and document it in the process.

Siddhant-K-code commented 2 years ago

Related Files to Issues:

dennyabrain commented 2 years ago

Quick Instructions to get the project running

  1. run docker-compose up to bring up the sql database and a database GUI
  2. cd into annotators/backend/sequelize and run npx sequelize-cli db:migrate - this will create the tables in db
  3. run npx sequelize-cli db:seed --seed 20211115172651-beta-test - this will run the script located here and insert users named tarunima, arnav etc. You will have to check the db to see their password. which is stored in plain text for now.
dennyabrain commented 2 years ago

If this is your first time using sequelize, i suggest spending sometime reading its documentation and specifically this page to familiarise yourself with migrations and seeding

dennyabrain commented 2 years ago

@Siddhant-K-code could you also look into what are the best practices to developing login form. From a cursory research that I did, it seems like if we implement our login section as part of an html form and add the attribute autocomplete to the username and password field, the browser should take care of the rest. ref : https://www.w3schools.com/TagS/att_input_autocomplete.asp

can you investigate if

  1. there's more to it
  2. if this fixes this bug
tarunima commented 2 years ago

@dennyabrain can you confirm that this can be closed?

dennyabrain commented 2 years ago

Not yet. Its not fixed yet and we dont have a solution so far

dennyabrain commented 1 year ago

Not relevant anymore