Richard
Richard

Reputation: 7433

FirebaseAuth setting a timer on sendPasswordResetEmail and sendEmailVerification before next request is allowed

I want to set a timer, e.g. 30 seconds, after the first email is sent before allowing the user to send another email to request for password reset or to verify email. I was thinking about storing a timestamp in Cloud Firestore that indicates when the last email was sent and subtract current timestamp with stored timestamp to retrieve time elapsed in seconds. If time elapsed is less than 30 seconds, I will just disallow the sending of said emails.

However, is there a function provided by Firebase to do the above?

Upvotes: 0

Views: 76

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317710

There is no API available for this. You will have to implement it yourself.

Upvotes: 1

Related Questions