talawa-api / Exports / resolvers/Mutation/forgotPassword
• Const
forgotPassword: MutationResolvers
["forgotPassword"
]
This function enables a user to restore password.
Param
parent of current request
Param
payload provided with the request
Remarks
The following tasks are done:
- Extracts email and otp out of otpToken.
- Compares otpToken and otp.
- Checks whether otp is valid.
- Updates password field for user's document with email === email.