To handle the case when someone becomes a user of a paid web application, "we", as developers, need to take several steps:
- add them to the database
- verify their email
- send them a welcome message <- server
- charge them
- redirect them
- is there something else?
Most dev guides cover "add them to the database" and "redirect them". I have created all of the steps in my application. Naively, I took all of my steps and plopped into the route handler for a new user.
As I stand on the precipice of really-this-matters development, I am wondering:
- Does the order of operations matter? (obviously, we don't want to redirect to an authenticated area before we actually make an account and charge them, but should we wait to create the account until they click on the "confirm" email?)
- Do you have a story from your experience?
- If you verify email through verification service, do you still want to send a verify/confirm email email?
- Am I missing something huge?


















Just to throw a word of caution here: There are situations where redirects can be intercepted and exploited as a vulnerability. I'm not in a good position to go into length on this at the moment but if someone wants to add some insight here, please do!
P.S. I'm definitely overly cautious in this area. If anyone wants to tell me I'm wrong to think this could be a point of vulnerability, let me know.
This is a part of your process where security should be front and center. It always should be in a sense, but especially here. Of course, HTTPS and ensuring the verification process verifies what it's supposed to verify are other things to take a lot of care over.
I'd love to read the rest of what folks have to say. This was just a quick reaction.