diegohaz / rest

REST API generator with Node.js, Express and Mongoose
MIT License
1.79k stars 311 forks source link

send email confirmation to validate user registration #32

Open jay-jlm opened 7 years ago

jay-jlm commented 7 years ago

It looks like sendgrid is currently only used to reset user passwords. If that is the case it would be nice to have it also used to send a confirmation email upon user registration, so that it can be properly validated.

I suppose this would require the use of a unique email validation token.

diegohaz commented 7 years ago

This is a requirement since the beginning (as you can see here), and I have some idea on how to do that, but I would like to see more use cases. If you implement this in your project, please consider sharing the piece of code here or sending a PR.

ninjasort commented 7 years ago

+1 on this. Awesome generator btw!

I use mailgun. It would be nice to opt in for different email providers or BYOE.

Let me know if you need help with this!

diegohaz commented 7 years ago

Switching to mailgun (or adding an option to use it on the generator) should not be a problem, as this is encapsulated on a service.

I will really appreciate some help.

I plan to do some structure changes on the generator for the v1.0.0 to make this look more like the generator I'm working on another project (https://github.com/diegohaz/arc/tree/yeoman-generator, look at the templates folder, they are just submodules of other branches). People will be able to contribute to the actual boilerplate instead of dealing with generator specifics, template language etc.

Once I completely release the generator-arc and learn with it I will open an issue here with the details so other people can help with the migration. Basically we'll have a branch with the rest api boilerplate (which can be git cloned as well) and another one with the generator.

ninjasort commented 7 years ago

@diegohaz Cool! Submodules would be great for different boilerplates, potentially a GraphQL service.

Also, I've been looking for something with React/Redux that's isomorphic. Have you seen the redux-cli it has a cool set of scaffolding commands, maybe arc could have similar ones for the Atomic Design components.

diegohaz commented 7 years ago

@cameronroe It's not released yet, but currently generator-arc has the following commands:

image

image

image

image

image

It will be fire tested later today on a hackathon with dozen of people using it. The difference is this way we don't have many options to customize the resources we are generating (like we do on generator-rest), but we have many resources which our new resource can be based on.

This way people can add different APIs (user, account, article, photo etc.) to the boilerplate and developers could choose which they want their new API to be based on.

ninjasort commented 7 years ago

Cool. Yeah, I really like the set up in this generator. Clean code! Any thought about separating these services into other modules as micro services themselves? Then you could just use the services as submodules as well or simply npm install them.