I generate a token in the net core needed to change the password, it is sent to the email, then after clicking the link in the email it moves to the front page in the angular, which performs an API request for confirmation of the email address, unfortunately the problem is that the token the API gets changed, ie there is no + what you see in the two above tokens, that is, one token. Its first version is the version generated in the API, and the second version is the token that reaches from the front to the API. I do not know how to deal with it. I know that the problem lies on the front because it's from him requesting to activate the email.
Generated token:
CfDJ8BUjSrrXE9xEiTFPyVuPcKDsxGyY81gv4tiZ+Y8Ntrx6PPMGmhqgpDUI7Kbpuc5PZz/YcudD/SWYSGqeniyPlpZGxfgclYwNtm/3Ef3uHUTajlrs61yMPEVA/g0yLWzaHkkxitckXYdclgK8RyUEA3s4rnJ9xP1ihHlkPFZNgn5cC4q/x/oSgjxBAysGaoBM192TfS9dhGDeKR4YqYBVQEYQKnmtljkdKdgt21z0d4zGaW0rHBOn/GtLIrGXwcokng==
The token obtained
CfDJ8BUjSrrXE9xEiTFPyVuPcKDsxGyY81gv4tiZ Y8Ntrx6PPMGmhqgpDUI7Kbpuc5PZz/YcudD/SWYSGqeniyPlpZGxfgclYwNtm/3Ef3uHUTajlrs61yMPEVA/g0yLWzaHkkxitckXYdclgK8RyUEA3s4rnJ9xP1ihHlkPFZNgn5cC4q/x/oSgjxBAysGaoBM192TfS9dhGDeKR4YqYBVQEYQKnmtljkdKdgt21z0d4zGaW0rHBOn/GtLIrGXwcokng==
My code to send request:
ngOnInit() {
this.activateRouted.queryParamMap.subscribe(params => {
let code = params.get("confirmationToken");
let userId = params.get("id");
if (code != null && userId != null){
this.userService.confirmEmail(userId,code).subscribe((data: any) => this.confirmSuccess(data),
(err: HttpErrorResponse) => this.confirmError(err));
}
});
}
confirmEmail method from userService:
public confirmEmail(userId: string, code: string) {
const req = this.apiService.get(`/api/register/confirm/?id=${userId}&confirmationToken=${code}`);
return req;
}