1.0.2 • Published 3 years ago

otp-mailer-verifier v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Features

  • Easy to use.
  • Less lines of code.
  • Generates , sends(email) and verifies otp.

Prerequisites

Inorder to send email , you will be requiring a password which is easy to generate. Following are the steps to generate this password: 0. Your account should have 2 step authentication. 1. Go to your Google account. (Use the account from which you have to send email). 2. Go to security. 3. Under security, there is an option called "app passwords". 4. In app password, generate a password and copy it. app passwords

Here is a video on how to generate app password. You can refer to this.

https://user-images.githubusercontent.com/69195262/139570236-4f6330f4-f275-4624-84e4-bb6127668c73.mp4

Installation

npm install otp-mailer-verifier 

Usage

  1. Require the package.
const otpMailer = require('otp-mailer-verifier');

With this package, you can easily generate 6 digit otp, send otp on mails and verifies otp entered by user.

  1. Generating and sending a otp on email.
otpMailer.send(senderMail,password,receiverMail);
// here password is the app password that is generated using Google account.
//here all the parameters should be of string datatype.

For eg:

otpMailer.send("siddhibhanushali@gmail.com","aadfffgghh","mrudulkolambe@gmail.com");
  1. Verifying the otp.
otpMailer.verify(userEnteredOtp);
// here userEnteredOtp is the otp which can be taken as input from the user

For eg:

otpMailer.verify(123456);

Maintainers

Siddhi Bhanushali and Mrudul Kolambe

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago