Docs

Reset a password

Set a new password for someone who is locked out, using a command on the server.

Run this on the machine that hosts Drive, with the same DATABASE_URL as the API. It needs the Go toolchain and a checkout of the repository.

Reset it

  1. Move to the API folder

    cd apps/api
    
  2. Run the command

    DRIVE_NEW_PASSWORD='a-new-long-password' DATABASE_URL=... go run ./cmd/reset-password <email-or-username>
    

    Without DRIVE_NEW_PASSWORD, the command reads the first line from standard input.

  3. Check the output

    It prints Password reset for <name>. They have been signed out everywhere.

The password must be at least 8 characters, not a very common one, and not the username or email.

It says no user was found

Check the email or username. The message is no user "<name>".

It says DATABASE_URL is required

Set DATABASE_URL to the value the API uses.