fastapi-react icon indicating copy to clipboard operation
fastapi-react copied to clipboard

Add smpt server for password emails

Open Buuntu opened this issue 4 years ago • 5 comments

There should be routes that trigger an email for "forgot" and "reset" password options. These can be celery tasks but probably need a separate container for a simple SMTP server in order to send the emails.

The fullstack Vue project has an example of a containerized SMTP server.

Buuntu avatar Jun 03 '20 18:06 Buuntu

The fullstack Vue app relies on a third party provider, but contains all the code to implement that. You need a signup page, I sort of threw one together earlier but didn't implement the endpoint yet. Just getting used to the cookiecutting so far, do I merely add the changes to the dev repo to the cookie cutter top level when they work?

F1r3Hydr4nt avatar Jun 04 '20 01:06 F1r3Hydr4nt

Thanks, if you want to take a stab at it that would be great! For the signup page, you can probably just reuse the login page with a few changes. Do you want me to assign this ticket to you?

Yeah for the SMTP server, the simpler the better. The Vue project has lots of email templates and might be overly complex for this, but if it's easy to copy+paste that is fine.

So the way I've been doing it for local development, which may not be the best way, is to make the changes at the top level and then run ./scripts/test_local.sh. It takes a minute to generate and start the docker-compose files but then you can see the changes in your local server once it does since this both starts the docker containers and runs all of the tests. I am curious myself if there is a better way to do this though, I think that's how the Vue project is setup and I haven't been able to find a better suggestion in the cookiecutter docs. The time it takes to build webpack is also very slow so it's not ideal.

For frontend stuff what you suggested might be better since this iteration cycle can take a while. For the backend it's a bit better since you can just write tests and they are very quick to run.

Buuntu avatar Jun 04 '20 02:06 Buuntu

I can take a look at implementing a 'signup' endpoint and associated form page, sure!

F1r3Hydr4nt avatar Jun 04 '20 11:06 F1r3Hydr4nt

What's the status of this? @freddiehonohan @Buuntu

pigeonflight avatar Oct 25 '20 17:10 pigeonflight

@pigeonflight a quick fix option for now, as I've done in other works could be configuring EmailJS with gmail SMTP to read and send variables from react.

JasonHoku avatar Oct 28 '20 00:10 JasonHoku