Password Reset

API: Internal/Beta

Users that authenticate with the password backend have the ability to reset their password.

Rationale

Users have the ability to reset their password from the Login page, using their email address. When the user submits an email address, the response will always be a 200 OK (for security reasons).

In case the email address is valid, the PasswordResetService will act as follows:

  • Generate a random token.

  • Send a link with the token to the provided email address.

  • Save the token along with the user’s id and an expiresAt timestamp (set to now + 30 minutes) in the database.

When the user click’s the link in the email sent from the service, he/she will be taken to a “Enter new password” page. Upon submission, the PasswordResetService will check if the token is valid (i.e. if it exists in the database table) and not expired (now < expiresAt). If so, a request with be sent to the auth-service to change the password through an end-point only accessible to PasswordResetService.


⚠️ WARNING: The API listed on this page will likely change to conform with our API conventions. Be careful when building integrations. The following changes are expected:

  • RPC names will change to conform with the conventions

  • RPC request and response types will change to conform with the conventions

  • RPCs which return a page will be collapsed into a single browse endpoint

  • Some property names will change to be consistent with Resources


Table of Contents

1. Remote Procedure Calls
Name Description
reset Initialize password-reset procedure by generating a token and sending an email to the user.
newPassword Reset the password of a user based on a generated password-reset token.
2. Data Models
Name Description
NewPasswordRequest No description
PasswordResetRequest No description

Remote Procedure Calls

reset

API: Internal/Beta Auth: Public

Initialize password-reset procedure by generating a token and sending an email to the user.

Request Response Error
PasswordResetRequest Unit CommonErrorMessage

newPassword

API: Internal/Beta Auth: Public

Reset the password of a user based on a generated password-reset token.

Request Response Error
NewPasswordRequest Unit CommonErrorMessage

Data Models

NewPasswordRequest

API: Internal/Beta

data class NewPasswordRequest(
    val token: String,
    val newPassword: String,
)
Properties
token: String
newPassword: String

PasswordResetRequest

API: Internal/Beta

data class PasswordResetRequest(
    val email: String,
)
Properties
email: String