Open Closed

Resend forgot password email error #5043


User avatar
0
ed_developer3 created

Hi We are using Application template with Angular as frontend for our application.

in Case user forgets password and tries to reset by clicking on the email received. After user clicks the link is opened in new browser tab and then on other tab where forgotpassword page was opened he tries to resend email by clicking Resend button but its giving 400 error. Can you help us to gracefully show a message to the user like "Email already sent:".

Thanks

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

10 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    but its giving 400 error. Can you help us to gracefully show a message to the user like "Email already sent:".

    Please share the full logs of backend, Thanks

    liming.ma@volosoft.com

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ed_developer3 created

    Here are the logs https://easyupload.io/eya839

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    HTTP 400

    This is an error coming from Antiforgery token validation, We can't show "Email already sent:". to user.

    Antiforgery token validation failed. The antiforgery cookie token and request token do not match.
    Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery cookie token and request token do not match.
       at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.ValidateTokens(HttpContext httpContext, AntiforgeryTokenSet antiforgeryTokenSet)
       at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.ValidateRequestAsync(HttpContext httpContext)
       at Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.ValidateAntiforgeryTokenAuthorizationFilter.OnAuthorizationAsync(AuthorizationFilterContext context)
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ed_developer3 created

    Can you help us in resolving this error? Any solution for this?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    1
    maliming created
    Support Team Fullstack Developer

    hi

    You can override the Account/ForgotPassword and disable the csrf. But its not recommended,

    https://learn.microsoft.com/en-us/aspnet/core/security/anti-request-forgery?view=aspnetcore-7.0#override-global-or-controller-antiforgery-attributes

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ed_developer3 created

    hi Maliming,

    let me try your solution.

    Thanks

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    🙂

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ed_developer3 created

    how can we override antiforgery we don't have account/forgotpassword endpoint in api. Can you please share more details about it.

    Also is there a way to handle 500 error gracefully on fogotpassword login page so that we redirect user to login page instead of displaying error message.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    -1
    maliming created
    Support Team Fullstack Developer

    hi

    https://support.abp.io/QA/Questions/160/How-to-customize-an-ABP-project

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ed_developer3 created

    It worked thank you

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on October 05, 2026, 11:32
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.