> For the complete documentation index, see [llms.txt](https://docs.snapfix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snapfix.com/how-the-apps-work/screens/account/legacy-reset.md).

# Forgot password (legacy)

{% hint style="info" %}
Draft, written by an agent and not yet checked by a person ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). Platforms: iOS and Android. [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/screens/account/legacy-reset.md).
{% endhint %}

An older screen that asks for an email address or phone number and sends a new temporary password instead of a reset link. The person then replaces it on [Set password](https://docs.snapfix.com/how-the-apps-work/screens/account/set-password.md). The current reset is [Forgot password](https://docs.snapfix.com/how-the-apps-work/screens/account/forgot-password.md).

* **Where:** iOS: the "reset password" link in the "A Snapfix account already exists for …" alert (`CustomAlertVC`), which [Sign up by QR invitation](https://docs.snapfix.com/how-the-apps-work/screens/account/qr-sign-up.md) and the legacy [Create account](https://docs.snapfix.com/how-the-apps-work/screens/account/create-account.md) show. Android: the same alert's reset link on [Sign up by QR invitation](https://docs.snapfix.com/how-the-apps-work/screens/account/qr-sign-up.md). Android's `LoginFragment`, `LoginBottomSheet` and `LoginUsernameActivity` also open it, but no current screen uses them.
* **Who:** someone who tried to sign up with an email address or phone number that already has an account.
* **Feature:** [Password reset](https://docs.snapfix.com/product/features/account/password-reset.md)

Written from code only: a test run would reset a real account's password.

## Layout

**iOS,** top to bottom: a back arrow and "Forgot your password?", then "Enter your login email address to receive a new temporary password." or "Enter your login phone number to receive a new temporary password.", then the field for that type ("Email address", or "Phone number" with a country button), "Reset Password", and "Need help? Contact support". The field that does not match the type is hidden, and the one shown is faded and cannot be edited. A success panel replaces the form with "Password reset successful", "A temporary password has been sent to:" and the address (for email, also "Make sure to check your Spam/Junk folder."), and "OK".

Opened from the alert, the screen gets no address and no type: it shows the email field, empty and locked, and "Reset Password" stays disabled, so the screen cannot be used.

**Android,** top to bottom: a back arrow, "Forgot your password?", "Enter your login email address to receive a new temporary password." or "Enter your login phone number to receive a new temporary password.", the field for that type, filled from sign-up, faded and locked (for a phone, the country picker too), "Reset Password", then "Need help?" and "Contact support".

## Inputs

| Field         | Type                              | Required                    | Default                                                                             | Rules and messages                                                                                                                                                                            |
| ------------- | --------------------------------- | --------------------------- | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Email address | Email, locked                     | Yes, when the type is email | iOS: empty. Android: the address typed on sign-up                                   | iOS: "Please enter valid email address.". Android: "Please enter email or username" when empty; "Please enter a valid email address" when it has no "@", no letter, or fails the email check. |
| Phone number  | Phone with a country code, locked | Yes, when the type is phone | iOS: empty, with the device's country. Android: the number and country from sign-up | iOS: "Please enter valid phone number." when it has letters, fewer than four digits, or does not parse. Android: "Please enter valid phone number" when empty or invalid.                     |

## Actions

| Action             | Who                   | What happens                                                                                                                                                                                                                                                                                                                                                                                                                     | API                                                                                                  |
| ------------------ | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| "Reset Password"   | Anyone on this screen | Checks the field and the connection. iOS sends `username_estimate`, `loginType` and, for a phone, `countrycode`. Android sends `login_type`, `username_estimate` and, for a phone, `countrycode`. Success: iOS shows the success panel; Android a success dialog with the address and "OK", which closes the screen.                                                                                                             | `forgotpassword-v7` on [Auth API](https://docs.snapfix.com/engineering-reference/api/auth.md)        |
| Not verified       | Anyone                | When the server answers "not verified": iOS shows "You must have verified your mobile or email before you can use the Reset Password option" with "Ok" and "Cancel"; Android shows "You must have to verify your email before using it for reset password" or "You must have to verify your mobile number before using it for reset password". Both then open the verification code dialog, and a right code sends the password. | the code request and check in [Auth API](https://docs.snapfix.com/engineering-reference/api/auth.md) |
| "OK" (iOS success) | Anyone                | Hides the panel and goes back.                                                                                                                                                                                                                                                                                                                                                                                                   | -                                                                                                    |
| Back arrow         | Anyone                | Returns to the sign-up screen.                                                                                                                                                                                                                                                                                                                                                                                                   | -                                                                                                    |
| "Contact support"  | Anyone                | Opens an email to support. Android shows "No email app founded in this device." when there is none.                                                                                                                                                                                                                                                                                                                              | -                                                                                                    |

**What the server does.** The v7 action finds the account, replaces its password with a new random one, and sends "Your new Snapfix password is …" by email or text message, so the password travels in plain text. It answers with success, "invalid user" (no account) or "not verified".

**Staff usernames.** Android's code sends an email-type entry without "@" to the staff-username reset instead, whose URL ends with a space. On this screen that path is never reached: the email check runs first and rejects any entry without "@". iOS has the same call commented out.

Android also has a second send path through `create_serveronly_forgotpassword`, with its own failure text, "It appears the Email is not correct. Please enter a valid SnapFix Email into the Email box and try again."; nothing calls it.

## States

* **Loading:** "Refreshing..." while the request runs.
* **Empty:** iOS: "Reset Password" is disabled while the field is empty. Android: the button checks the field when pressed.
* **Error:** "There is no Snapfix account associated with this email address." or "This mobile number is not registered to a Snapfix account." for "invalid user". Any other server message is shown as it comes, or "Something went wrong. Please try again.".
* **No permission:** no role check.
* **Offline (mobile):** iOS shows "Reset Password" and "You must be connected to the Internet to carry out this task. Please connect and try again." with "Ok", and sends nothing. Android shows "You must be connected to the Internet to carry out this task. Please connect and try again.".

## Dialogs and sheets

| Dialog                     | What it shows                                                  | Actions                       |
| -------------------------- | -------------------------------------------------------------- | ----------------------------- |
| Not verified               | the sentence in [Actions](#actions)                            | "Ok", "Cancel"                |
| Verification code          | a six-digit code for the email address or phone number on file | check the code, cancel        |
| Reset successful (Android) | the address the password went to                               | "OK", which closes the screen |
| Contact support            | the phone's email composer                                     | send, cancel                  |

## Platform differences

| Topic          | iOS                                                              | Android                                     |
| -------------- | ---------------------------------------------------------------- | ------------------------------------------- |
| Reached from   | the account-exists alert in QR sign-up and legacy create account | the same alert in QR sign-up                |
| Address        | not passed in, so the field is empty and locked                  | filled from sign-up and locked              |
| Success        | a panel in the page                                              | a dialog                                    |
| Staff username | not sent                                                         | in the code, but blocked by the email check |
| Create account | `onPressedRegisterNow` exists but no button calls it             | -                                           |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snapfix.com/how-the-apps-work/screens/account/legacy-reset.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
