@page "/renewpassword/{userId}/{renewToken}" @inherits BasePageComponent @using TIAM.Models.Dtos.Users @using TIAM.Services @using TIAMSharedUI.Shared.Components.BaseComponents @using BlazorAnimation @using TIAMWebApp.Shared.Application.Interfaces @using TIAMWebApp.Shared.Application.Models.PageModels; @using TIAMSharedUI.Pages.Components; @using TIAMSharedUI.Pages.User.CardComponents @using TIAMWebApp.Shared.Application.Services @inject IUserDataService UserDataService @inject AdminSignalRClient AdminSignalRClient Renew password

Renew password

Good to see you again!

@{ if (!isFormHidden) {
@_localizer["LoginTitleText"]
No account yet? Sign up here!
Figured it out? Back to login!
} else {
@_localizer["LoginTitleText"]

@resultMsg

No account yet? Sign up here!
Figured it out? Back to login!
} }

Welcome back to Budapest Airport Transfer Services! We're delighted to have you return to our platform. Please sign in to access your account and manage your bookings effortlessly. If you're new here, feel free to create an account to unlock exclusive benefits and enjoy a seamless booking experience.

@code { [Parameter] public string? userId { get; set; } = ""; [Parameter] public string? renewToken { get; set; } = ""; private bool isFormHidden = true; string resultMsg = ""; private UserModelDtoDetail? user = new UserModelDtoDetail(); protected override async Task OnInitializedAsync() { if (userId != null && renewToken != null) { string msg = await UserDataService.ValidateForgotPasswordToken(Guid.Parse(userId), renewToken); if (msg == "Success") { user = await UserDataService.GetUserDetailByIdAsync(Guid.Parse(userId)); isFormHidden = false; } else { isFormHidden = true; resultMsg = msg; } } await base.OnInitializedAsync(); } protected override async Task OnParametersSetAsync() { //validate Token await base.OnParametersSetAsync(); } private void SendForm(bool isSuccess) { if (isSuccess) { resultMsg = "Successful, now you can go to the login page and log in with your new password!"; } else { resultMsg = "Password wasn't saved. Please try again sending the forgotten password email. "; } } }