# I want to decrypt the keycloack user password

**URL:** <https://forum.keycloak.org/t/i-want-to-decrypt-the-keycloack-user-password/25779>\
**Category:** Miscellanaeous\
**Created:** [April 29, 2024, 2:11pm UTC](https://forum.keycloak.org/t/i-want-to-decrypt-the-keycloack-user-password/25779 "2024-04-29T14:11:41Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![fulgence.adams](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fulgence.adams](https://forum.keycloak.org/u/fulgence.adams)\
**Post date:** [April 29, 2024, 2:11pm UTC](https://forum.keycloak.org/t/i-want-to-decrypt-the-keycloack-user-password/25779/1 "2024-04-29T14:11:41Z")

</div>

Hello,  
Can you help me please  
I want to compare my password through my app before using it.  
Basically I want to decrypt the keycloack user password

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [April 29, 2024, 2:11pm UTC](https://forum.keycloak.org/t/i-want-to-decrypt-the-keycloack-user-password/25779/2 "2024-04-29T14:11:58Z")

</div>

That’s not possible.  
And also security nonsense.

---

<div class="post-metadata">

**Author:** ![fulgence.adams](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fulgence.adams](https://forum.keycloak.org/u/fulgence.adams)\
**Post date:** [April 29, 2024, 2:23pm UTC](https://forum.keycloak.org/t/i-want-to-decrypt-the-keycloack-user-password/25779/3 "2024-04-29T14:23:34Z")

</div>

Ah ok  
Well, but in truth I have developed an application, however I want to change the password but before I have to enter the current password, and compare it. that is my concern.Can you help me with this please

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [April 29, 2024, 2:27pm UTC](https://forum.keycloak.org/t/i-want-to-decrypt-the-keycloack-user-password/25779/4 "2024-04-29T14:27:50Z")

</div>

Leave it up to Keycloak, don’t reimplement things, which don’t belong to your application.

Keycloak will ask the user for the current password (aka re-authentication), if the auth-time is more than 5 minutes ago. You can adjust this time with a password policy. Set it to 0 and Keycloak will always ask the user for the current password, before changing the password.

---

<div class="post-metadata">

**Author:** ![fulgence.adams](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fulgence.adams](https://forum.keycloak.org/u/fulgence.adams)\
**Post date:** [April 29, 2024, 2:33pm UTC](https://forum.keycloak.org/t/i-want-to-decrypt-the-keycloack-user-password/25779/5 "2024-04-29T14:33:34Z")

</div>

Excuse me but I still don’t understand,  
In my application I want to be able to enter the current password before changing it.  
So I’m looking for an API that allows me to do this.  
Is it

---

<div class="post-metadata">

**Author:** ![heiglandreas](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/heiglandreas/32/10315_2.png) [@heiglandreas](https://forum.keycloak.org/u/heiglandreas)\
**Post date:** [April 29, 2024, 2:42pm UTC](https://forum.keycloak.org/t/i-want-to-decrypt-the-keycloack-user-password/25779/6 "2024-04-29T14:42:17Z")

</div>

So you are looking for something like this?

> <https://stackoverflow.com/questions/71463619/can-i-check-if-the-userid-and-password-are-valid-in-keyclock/71463783#71463783>

---

<div class="post-metadata">

**Author:** ![ThoreKr](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/thorekr/32/7713_2.png) [@ThoreKr](https://forum.keycloak.org/u/ThoreKr)\
**Post date:** [April 29, 2024, 2:47pm UTC](https://forum.keycloak.org/t/i-want-to-decrypt-the-keycloack-user-password/25779/7 "2024-04-29T14:47:34Z")

</div>

So you are asking the same question as [Keycloak API Rest - check if password is correct](https://forum.keycloak.org/t/keycloak-api-rest-check-if-password-is-correct/24645/)?

A very convoluted way to get to that point, however, the answer by @dasniko still applies. Don’t. Use the required action flow and let Keycloak handle the messing with credentials part.

---

<div class="post-metadata">

**Author:** ![fulgence.adams](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fulgence.adams](https://forum.keycloak.org/u/fulgence.adams)\
**Post date:** [April 29, 2024, 3:05pm UTC](https://forum.keycloak.org/t/i-want-to-decrypt-the-keycloack-user-password/25779/8 "2024-04-29T15:05:18Z")

</div>

![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/a/a5f9281eec8eb62882355b50a8d0043965890ea1.png)

---

<div class="post-metadata">

**Author:** ![fulgence.adams](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fulgence.adams](https://forum.keycloak.org/u/fulgence.adams)\
**Post date:** [April 29, 2024, 3:06pm UTC](https://forum.keycloak.org/t/i-want-to-decrypt-the-keycloack-user-password/25779/9 "2024-04-29T15:06:07Z")

</div>

![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/1/10150d19c70b96ccab02d1688e7418ab4e261af5.png)

---

<div class="post-metadata">

**Author:** ![fulgence.adams](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fulgence.adams](https://forum.keycloak.org/u/fulgence.adams)\
**Post date:** [April 29, 2024, 3:07pm UTC](https://forum.keycloak.org/t/i-want-to-decrypt-the-keycloack-user-password/25779/10 "2024-04-29T15:07:06Z")

</div>

![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/6/63ba4017f4ebbb04bfadda681d780b328a39b5e7.png)

---

<div class="post-metadata">

**Author:** ![fulgence.adams](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fulgence.adams](https://forum.keycloak.org/u/fulgence.adams)\
**Post date:** [April 29, 2024, 3:09pm UTC](https://forum.keycloak.org/t/i-want-to-decrypt-the-keycloack-user-password/25779/11 "2024-04-29T15:09:31Z")

</div>

@ThoreKr  
Hello chef, this is exactly what I wanted however, how to redirect to the authentication page after changing the password please?

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [April 29, 2024, 4:08pm UTC](https://forum.keycloak.org/t/i-want-to-decrypt-the-keycloack-user-password/25779/12 "2024-04-29T16:08:43Z")

</div>

In the link @ThoreKr posted, there is a blog post linked from me, in this blog post, there is a `redirect_uri` mentioned…  
So, the information you need, is all there!  
And if you don’t know about the redirectUri, I recommend to read and learn about OIDC.
