> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/public-finance/v2.3/exemplar/mgramseva/user-manual/tech-user-manual/forgot-password.md).

# Forgot Password

Users are redirected to this screen if they click on the Forgot Password link on the home screen.

![](https://2287351256-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mfb8ehcimjt6ER7QOME%2F-MkMfk4khyrT7PLZ4nzL%2F-MkMgYesSbLjmJ8xxaoj%2Fimage.png?alt=media\&token=71f31661-edbf-4337-b32a-c105f92e827c)

## **OTP Request**

This feature allows users to request OTP by entering a valid (the registered) mobile number.

Follow the steps below to set a new password -

* Click on the Forgot Password link visible on the login screen
* Enter a valid mobile number

Other steps are explained in the Reset Password Section.

### **Files Path**

Primary Files[ <img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/ForgotPassword.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/screeens/ForgotPassword/ForgotPassword.dart)

### **Field Validation**

| **SL** | **Fields**     | **Validation** |
| ------ | -------------- | -------------- |
| 1      | Phone Number\* | `r'^[0-9]+$'`  |

### **API Details**

| **SL** | **End Point**       | **Request Method** | **Request Info**                                                                                                     |
| ------ | ------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------- |
| 1      | `user-otp/v1/_send` | `POST`             | <p>"otp": {<br>"mobileNumber": {},<br>"tenantId": {},<br>"type": "passwordreset",<br>"userType": "Employee"<br>}</p> |

#### **Stack**

2 → Language Selection Screen. + Login Screen + ForgotPassword

Pop → Login Screen Screen.

&#x20;Widgets Utilised from Library

| **SL No** | **Widgets**      | **File Path**                                                                                                                                                                                                                                                               | **Description** |
| --------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| 1         | `BuildTextField` | [<img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/TextFieldBuilder.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/widgets/TextFieldBuilder.dart) | Text Field      |
| 2         | `Button`         | [<img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/Button.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/widgets/Button.dart)                     | Button          |

## Reset Password

### **Link**

→ {base url}/mgramseva/selectLanguage/login/forgotPassword/resetPassword.

![](https://2287351256-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mfb8ehcimjt6ER7QOME%2F-MkMfk4khyrT7PLZ4nzL%2F-MkMgUJoyRt3H1ugAtSR%2Fimage.png?alt=media\&token=97d97aa2-af0b-4ef6-9484-5839d2779ad0)

Users are redirected to this screen if they click on the Continue button on Forgot Password screen.![](blob:https://digit-discuss.atlassian.net/c66daa8d-7438-4ae7-b673-b2010ba3fc31#media-blob-url=true\&id=808f425b-2032-4943-96ea-53a8f39c452a\&collection=contentId-1922728099\&contextId=1922728099\&mimeType=image%2Fpng\&name=Reset%20Password.png\&size=96701\&width=377\&height=813\&alt=)

### **User Interaction on Screen**

* Enter the OTP sent on the user’s 10 digit Mobile Number.
* Set the new password for logging into the application.
* Click on Change Password to apply new password credentials for the user.

### **Password Hint Card**

* This feature helps to provide the users with a clear indication of what the password should contain. Acceptable passwords must contain -
  * Minimum 6 digits
  * At least one special character ( !#$%^&...)
  * At least one letter
  * At least one number

### **Files Path**

Primary Files[ <img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/Resetpassword.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/screeens/ResetPassword/Resetpassword.dart)

### **Field Validations**

| **SL** | **Fileds**             | **Validations**                                            |
| ------ | ---------------------- | ---------------------------------------------------------- |
| 1      | Enter the OTP sent \*  | `r'^[0-9]+$'` , 6 digit                                    |
| 2      | Enter a New Password\* | `r'^(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{6,}$'` |
| 3      | Confirm New Password   | Match with New Password                                    |

### **API Details**

| **SL** | **End Point**                   | **Request Method** | **Request Info**                                                                                             |
| ------ | ------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------ |
| 1      | `user/password/nologin/_update` | `POST`             | <p>"otpReference": {},<br>"userName": {},<br>"newPassword": {},<br>"tenantId": {},<br>"type": “Employee”</p> |

#### **Stack**

1 → Language Selection Screen. + Login Screen + Forgot Password + Reset Password.

Pop → Forgot Password Screen.

Widgets Utilised from Library

| **SL No** | **Widgets**       | **File Path**                                                                                                                                                                                                                                                               | **Description**    |
| --------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| 1         | `BuildTextField`  | [<img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/TextFieldBuilder.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/widgets/TextFieldBuilder.dart) | Text Field         |
| 2         | `BottomButtonBar` | [<img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/BottonButtonBar.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/widgets/BottonButtonBar.dart)   | Button             |
| 3         | `PasswordHint`    | [<img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/PasswordHint.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/widgets/PasswordHint.dart)         | Password Hint Card |

> [![Creative Commons License](https://i.creativecommons.org/l/by/4.0/80x15.png)*​*](http://creativecommons.org/licenses/by/4.0/)*All content on this page by* [*eGov Foundation*](https://egov.org.in/) *is licensed under a* [*Creative Commons Attribution 4.0 International License*](http://creativecommons.org/licenses/by/4.0/)*.*


---

# 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.digit.org/public-finance/v2.3/exemplar/mgramseva/user-manual/tech-user-manual/forgot-password.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.
