I'm making a React application in which I need to implement two step registration. The server made in java sends a link to the mail through which the user goes.
The link looks something like this http:localhost:8080/users?token=wkejejwgwgwowo...
After the user has followed the link, I need to get the value of the token parameter and send a patch request to the server.
How can I do this if my application is located on localhost:3000?
I tried to intercept requests between the backend and mail using axios intercepts but it seems to me that I'm doing something wrong.
CodePudding user response:
I can't add a comment, so I'm posting this as an answer. I believe your task gets easier if the link you generate directly leads you to the application. That is, when you generate the link to be sent, generate it as "http:localhost:3000/users?token=wkejejwgwgwowo..."
CodePudding user response:
With two-step verification via mail, the link should go to the frontend for further processing.