c0sogi / LLMChat

A full-stack Webui implementation of Large Language model, such as ChatGPT or LLaMA.
MIT License
245 stars 40 forks source link

email registration fails silently #2

Closed Torhamilton closed 1 year ago

Torhamilton commented 1 year ago

If the email has . the registration fails. e.g. me.you@gmail.com fails

c0sogi commented 1 year ago

https://github.com/c0sogi/chatgpt-webapp-server/assets/121936784/7c62fc08-9f85-40ed-9c1a-0e31ad50c23b

The reason why you can't sign up with that account is probably because the account already exists in the mysql database. As you can see in the video above, after deleting the already registered user and sign up, it is registered normally. It doesn't have an unregister function yet, but we'll update it soon.

Torhamilton commented 1 year ago

On second thought, best to give user a notice like "email is already registered"

c0sogi commented 1 year ago

In b0fe554ca2327d2dc43dc819934b7973e662ffdb, while adding the unregister function, I changed it to output detail on login & register failure. However, if you already have a MySQL table created, the unregister function may not work properly, because the cascade option was not entered in child table's ForeignKey before. To solve this, I recommend removing the mysql volume via docker-compose -f docker-compose-prod.yaml down -v and up again