I am creating a web app and need to send an email verification to users after they registered in the system. When the user receives a verification email, they need to click on the link in that email to verify their email address. My question is whether the link points to my backend server or to my frontend.
Options1: If I make the link to my backend, I need to implement a GET RESTFul service to receive this request since browser couldn't send a POST request. After verification, backend will response a redirect to the browser to redirect to front end url. This may be not a best practice in terms of RESTFul design since it makes changes in my database.
Option2: If I make the link to the front end, my front end needs to parse the verify code from the url and send a post request to the backend to do the verification job.
I am not sure which one is better. Does anyone give me some suggestions on that?
My frontend and backend are separated. Backend is implemented in Python while front end is angularjs. They communicate through Restful API.