Skip to content

Password Resets

Bodhi Mulders edited this page Mar 12, 2021 · 5 revisions

There are currently two options for resetting user passwords:

  1. Changing passwords manually
  2. Letting users reset their own passwords

Changing passwords manually

In order to change user passwords, a script is included inside the docker container. You can run it as follows:

$ docker exec -it <container_name> ./scripts/set-password.sh <user_email> <new_password>

In case you do not know the name of the container, you can find out by running docker ps.

So in case your container is named shirakamisrs, and you want to change the password for the user registered to mail@example.com, you can run:

$ docker exec -it shirakamisrs ./scripts/set-password.sh mail@example.com hunter2

Letting users reset their own passwords

When setting up this method for password resets, users will be able to reset their passwords via the "forgot password" flow on the sign-in screen. When they attempt to reset their password, they will be sent an email with a temporary link, which they can use to change their password.

In order to let users reset their own passwords, a SMTP server has to be configured for ShiraKamiSRS to be able to send emails. To find out how to configure this, please read the page on Configuring SMTP.

When a SMTP server has been correctly configured, password resets can be enabled for users by setting the ENABLE_PASSWORD_RESETS environment variable to true.