Skip to content

Latest commit

 

History

History
38 lines (21 loc) · 939 Bytes

resolvers_Mutation_forgotPassword.md

File metadata and controls

38 lines (21 loc) · 939 Bytes

talawa-api / Exports / resolvers/Mutation/forgotPassword

Module: resolvers/Mutation/forgotPassword

Table of contents

Variables

Variables

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:

  1. Extracts email and otp out of otpToken.
  2. Compares otpToken and otp.
  3. Checks whether otp is valid.
  4. Updates password field for user's document with email === email.

Defined in

src/resolvers/Mutation/forgotPassword.ts:17