I am trying to setup a system where the user who registers on my website is verified by sending an email to the email address they provide.
What I want to do is sign their email address with JSON webtoken, email them a link to click. When they click the link, it should take them to my website to a page that says "Your account was verified. Happy browsing"
To do this, i figure I need to generate a link that will trigger a react action when clicked. Any idea how this is done? Does it open a page, send the page the signed token, which when verified then triggers the action?
I think you have different ways to do it, for the instance we could have
With your react-router or other routing system you can mount pour "valid account" component on the matching route, on DidMount of this component dispatch your async action. This action should be able to dispatch different action (START_CHECKING, SUCCESSFUL_CHECK, ERROR_CHECK, whatever ...) and of course do the api call to your server. Your reducer should handle the different case.
Your "valid account" component can be connected and tell to user the status of the check.
Bonus : In willReceiveProps you could even redirect to home in case of successful validation.
I hope I understood your problems and that will be helpful, if you have more questions no problem