-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User change own password #14
Comments
@x19chen OpenIddict uses ASP.Net Core Identity for user management. You wouldn't necessarily use OpenIddict-ui to allow a user to change their own password; openiddict-ui is for an admin role not a user role. You can most likely use some of the existing ASP.Net Core Identity functionality to do this. You would just need to write an api endpoint that allows a user to change their password similar to how the existing ASP.Net Core Identity functionality does it. If you've generated all the Identity code for your project you should have a ChangePassword page somewhere in your solution. For example there is a Change Password page which is most likely located under Areas/Identity/Pages/Account/Manage/ChangePassword. You can see how this is done via the existing ASP.Net Core web application using the following code:
All you will need to do is create an api endpoint that requires authentication and allows the authenticated user to pass in the data to change their password. Let me know if this helps. -Robert |
@browrp @thomasduft Enjoy your weekend. Xiaoyang |
Hi Thomas,
I have a concern regarding how a user can change his own password.
From my understanding, the APIs are more or less designed for an user admin. While this is fine probably for most use cases, an user might want to change his own password since he does not want the admin to know his password. At the moment, it seems to me that it is not possible for a non-admin role, or did I miss something?
Best regards,
Xiaoyang
The text was updated successfully, but these errors were encountered: