# User password change

**URL:** <https://forum.keycloak.org/t/user-password-change/300>\
**Category:** Getting advice\
**Tags:** admin-console\
**Created:** [November 4, 2019, 9:03am UTC](https://forum.keycloak.org/t/user-password-change/300 "2019-11-04T09:03:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![aleksandar78](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/aleksandar78/32/121_2.png) [@aleksandar78](https://forum.keycloak.org/u/aleksandar78)\
**Post date:** [November 4, 2019, 9:03am UTC](https://forum.keycloak.org/t/user-password-change/300/1 "2019-11-04T09:03:19Z")

</div>

Hi,

my question may be obvious but I didn’t find any easy solution for it.  
I have a simple Single Page Application that uses Keycloak to authenticate users and use its JWT to access some Rest API. So far so good.  
I create a list of users ( without email for some specific reason ) and I added some random password to each client that must be changed at first access. The problem is that I need to give a user the ability to reset its password in complete autonomy and whenever he wants without any admin intermediation.  
I see some blog post that explains how API Rest can be used for a password reset but I would prefer not to do it over API because I’ll need to implement that on my own. My idea would be to give some access rights on each user which give them permission to enter in restricted Keycloak page and reset their own credentials.  
Any suggestions or tips are welcome.  
Thanks in advance

Aleksandar

---

<div class="post-metadata">

**Author:** ![micedre](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/micedre/32/31_2.png) [@micedre](https://forum.keycloak.org/u/micedre)\
**Post date:** [November 5, 2019, 6:23am UTC](https://forum.keycloak.org/t/user-password-change/300/2 "2019-11-05T06:23:57Z")

</div>

You could give your users access to the account console located at :  
`https://<keycloak-url>/auth/realms/<realm>/account`

There is a form to update password (and other useful information about the account).

---

<div class="post-metadata">

**Author:** ![aleksandar78](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/aleksandar78/32/121_2.png) [@aleksandar78](https://forum.keycloak.org/u/aleksandar78)\
**Post date:** [November 7, 2019, 10:10pm UTC](https://forum.keycloak.org/t/user-password-change/300/3 "2019-11-07T22:10:23Z")

</div>

That’s what I was looking for.

Thanks

---

<div class="post-metadata">

**Author:** ![anton.pytel](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/anton.pytel/32/369_2.png) [@anton.pytel](https://forum.keycloak.org/u/anton.pytel)\
**Post date:** [June 30, 2020, 10:38am UTC](https://forum.keycloak.org/t/user-password-change/300/4 "2020-06-30T10:38:49Z")

</div>

We are able to change password without the problem, but we need to close all sessions (do single sign out) automatically after password change. Is it possible to configure this behavior for realm inside admin GUI?

Thank you in advance for help.

---

<div class="post-metadata">

**Author:** ![Nandika](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/nandika/32/3113_2.png) [@Nandika](https://forum.keycloak.org/u/Nandika)\
**Post date:** [May 6, 2021, 2:08pm UTC](https://forum.keycloak.org/t/user-password-change/300/5 "2021-05-06T14:08:12Z")

</div>

The APIs below might help.

Logout:  
`http://<keycloak-url>/auth/admin/realms/<realm>/users/<keycloak-user-id>/logout`

Sessions associated:  
`http://<keycloak-url>/auth/admin/realms/<realm>/users/<keycloak-user-id>/sessions`

---

<div class="post-metadata">

**Author:** ![KetanMangukiya](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@KetanMangukiya](https://forum.keycloak.org/u/KetanMangukiya)\
**Post date:** [July 29, 2021, 7:25am UTC](https://forum.keycloak.org/t/user-password-change/300/6 "2021-07-29T07:25:47Z")

</div>

I have one drop down in one field is “Change Password” now how to set redirect url this keycloak user password change url

---

<div class="post-metadata">

**Author:** ![ayoub96anbara](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/ayoub96anbara/32/4355_2.png) [@ayoub96anbara](https://forum.keycloak.org/u/ayoub96anbara)\
**Post date:** [November 10, 2021, 1:26pm UTC](https://forum.keycloak.org/t/user-password-change/300/7 "2021-11-10T13:26:02Z")

</div>

If you use spring boot:

```auto
@Autowired
    private AdapterDeploymentContext adapterDeploymentContext;
@GetMapping("/account")
    public String account(RedirectAttributes attributes, HttpServletRequest request, HttpServletResponse response) {
        final HttpFacade facade = new SimpleHttpFacade(request, response);
        final KeycloakDeployment deployment = adapterDeploymentContext.resolveDeployment(facade);
        attributes.addAttribute("referrer", deployment.getResourceName());
        attributes.addAttribute("referrer_uri", request.getHeader("referer"));
        return "redirect:" + deployment.getAccountUrl() ;
    }

```

More details [GitHub - amaryassa/secure-diffrents-apps-with-keycloak: keycloak + Angular + Spring thymeleaf + Spring Micro Service](https://github.com/amaryassa/secure-diffrents-apps-with-keycloak)

---

<div class="post-metadata">

**Author:** ![Leonardorossato](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/leonardorossato/32/8345_2.png) [@Leonardorossato](https://forum.keycloak.org/u/Leonardorossato)\
**Post date:** [April 19, 2023, 5:52pm UTC](https://forum.keycloak.org/t/user-password-change/300/8 "2023-04-19T17:52:07Z")

</div>

I have the same problem using keycloak with nestjs, i nedd a api route to user change password is possible?

---

<div class="post-metadata">

**Author:** ![vrajeshmodi30](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/vrajeshmodi30/32/9350_2.png) [@vrajeshmodi30](https://forum.keycloak.org/u/vrajeshmodi30)\
**Post date:** [November 30, 2023, 7:19am UTC](https://forum.keycloak.org/t/user-password-change/300/9 "2023-11-30T07:19:02Z")

</div>

Any update on this ?
