yann-yinn / adonis-starter

A Node.js / TypeScript / Postgres starter with ready-to-use users management (register, login, forgot password etc) to focus on building your new ideas. Built upon the excellent AdonisJS MVC Framework.
71 stars 15 forks source link

"Show password" feature: allow user to view the password he entered #16

Closed yann-yinn closed 3 years ago

yann-yinn commented 3 years ago

a little blue link "show password" above the password field, for example (this is form from mailchimp)

Capture d’écran 2021-09-29 à 18 21 58

This must work on the following forms:

Sreejit7 commented 3 years ago

hey, could you please direct me to the file where this form is located?

yann-yinn commented 3 years ago

@Sreejit7 several places for now:

https://github.com/yann-yinn/mvp-starter/blob/main/resources/views/forms/signupForm.edge https://github.com/yann-yinn/mvp-starter/blob/main/resources/views/forms/userForm.edge https://github.com/yann-yinn/mvp-starter/blob/main/resources/views/forms/signinForm.edge https://github.com/yann-yinn/mvp-starter/blob/main/resources/views/pages/resetPassword.edge

yann-yinn commented 3 years ago

PS: form picture in the first comment of this issue is just an example from mailchimp site

Sreejit7 commented 3 years ago

Thanks! Do you want to the default behavior of passwords to be hidden or visible?

yann-yinn commented 3 years ago

you're welcome ! Hidden by default

Sreejit7 commented 3 years ago

Got it. I would like to try this, would you please assign this to me?

yann-yinn commented 3 years ago

maybe it's time to consider moving password fields to their own component / partial to avoid dupplicated code, feel free to suggest what you think is the best :)

Sreejit7 commented 3 years ago

yeah sure :)

Sreejit7 commented 3 years ago

Do I need to setup SMTP in SES for running the project? facing some error in running with regards to SMTP variables

yann-yinn commented 3 years ago

yep we are sending mail on account creation / forgot password, so you need to configure a STMP. I'm using "send in blue" in France but maybe you can create a "mailgun" account for example ?

yann-yinn commented 3 years ago

PS: or SES (this is aws solution isn't it ?), never used it so i don't know if they are providing SMTP or an API

Sreejit7 commented 3 years ago

Thanks, I'll check it out. I've never used SES as well, but saw some SES related stuff in the .env file too, that's why I thought it might be needed.

yann-yinn commented 3 years ago

Oh I see, in the .env.example yes.

For now config/mail.ts is configured to "smtp" by default, so actually for now only those variables are used:

SMTP_HOST=<localhost>
SMTP_PORT=587
SMTP_USERNAME=<username>
SMTP_PASSWORD=<password>
Sreejit7 commented 3 years ago

I figured it out, it runs now! Thanks!

Sreejit7 commented 3 years ago

@yann-yinn I've added a solution that works for now, but the code is a lil ugly. I'll try to improve on it!

yann-yinn commented 3 years ago

merged !