# Lost password plugin

**URL:** <https://forum.getkirby.com/t/lost-password-plugin/7574>\
**Category:** Plugins\
**Tags:** idea\
**Created:** [May 24, 2017, 12:28pm UTC](https://forum.getkirby.com/t/lost-password-plugin/7574 "2017-05-24T12:28:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ola](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ola/32/3465_2.png) [@ola](https://forum.getkirby.com/u/ola)\
**Post date:** [May 24, 2017, 12:28pm UTC](https://forum.getkirby.com/t/lost-password-plugin/7574/1 "2017-05-24T12:28:37Z")

</div>

I really miss the functionality for a user to create a new password if lost. I think this should be is the core, but until then, I’m searching for a plugin.

I know there are some forum threads about this with some manual solutions. But a plug-and-play-plugin would make things easier. But as a said, it should be in the core.

---

<div class="post-metadata">

**Author:** ![bnomei](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/bnomei/32/775_2.png) [@bnomei](https://forum.getkirby.com/u/bnomei)\
**Post date:** [May 24, 2017, 2:56pm UTC](https://forum.getkirby.com/t/lost-password-plugin/7574/2 "2017-05-24T14:56:57Z")

</div>

has been [asked before](https://forum.getkirby.com/search?q=password), a [plugin exists](https://forum.getkirby.com/t/kirby-panel-forgot-password/2192/26) and @texnixe [suggested adding this to core](https://forum.getkirby.com/t/forgot-password-in-panel/3719/7?u=bnomei) as well. maybe a github issue exists – to lazy to look it up. 😉

edit: oh nevermind you said you know about the older threads.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [May 24, 2017, 3:02pm UTC](https://forum.getkirby.com/t/lost-password-plugin/7574/3 "2017-05-24T15:02:02Z")

</div>

I wouldn’t use that plugin mentioned by @bnomei, I think you better go looking what @samnabi does in his [Shopkit](https://github.com/samnabi/shopkit). We only have to find someone who wants to make that into a plugin… or wait for Kirby…

---

<div class="post-metadata">

**Author:** ![ola](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ola/32/3465_2.png) [@ola](https://forum.getkirby.com/u/ola)\
**Post date:** [May 24, 2017, 3:39pm UTC](https://forum.getkirby.com/t/lost-password-plugin/7574/4 "2017-05-24T15:39:20Z")

</div>

I know @bnomei that this has been asked before. I just wanted to have a fresh thread about this in this new #plugins:ideas section of the forum. This is such a basic functionality of a CMS that I’m really amazed that this is not part of the core yet.

---

<div class="post-metadata">

**Author:** ![samnabi](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/samnabi/32/5535_2.png) [@samnabi](https://forum.getkirby.com/u/samnabi)\
**Post date:** [May 24, 2017, 4:14pm UTC](https://forum.getkirby.com/t/lost-password-plugin/7574/5 "2017-05-24T16:14:52Z")

</div>

The password reset function in Shopkit has 2 major components:

First, a function that adds a random `token` field to a user’s account file:

> <https://github.com/samnabi/shopkit/blob/master/site/plugins/shopkit/shopkit.php#L507>

And second, a route that will accept that one-time use token, change the user’s password, log them in, and redirect them to change their password:

> <https://github.com/samnabi/shopkit/blob/master/site/plugins/shopkit/registry/routes.php#L112>

This is probably not easy to include by default into Kirby core for a few reasons:

1. It requires a new `/token` route which could conflict with existing sites.
2. It relies on creating and destroying `token` fields within the user’s account file, which could conflict with existing sites.
3. Sending account tokens via email can introduce security risks if your outgoing mails are logged on the server. Kirby has no control over this.
