Open Closed

Force User to change password on login #464


User avatar
0
mmorrisset created

Hi, I need to setup a way to force a user to change their password on their next login. I created a flag in the user table that when set, redirects them to a custom change password page. When I call UpdatePasswordAsync() from the IdentityUserAppService, logged in as a non admin user, I get a permission error. How can I reset a users password from my own code?

Also, I see that I have asked 3 questions on here. I have only asked 1. How are you counting?

Thanks <matt>

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

3 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    I think you can use the IProfileAppService service. it has ChangePasswordAsync method.

    I see that I have asked 3 questions on here. I have only asked 1. How are you counting?

    I will check it out.

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

    Now a user can update their password. My problem now is that I can't update my "ChangePassword" flag in the user table due to permissions. How can I update a field in the user table as a non admin user?

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

    Hi,

    You can update the ChangePassword via override services. see: https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Overriding-Services

    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 September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.