Code Monkey home page Code Monkey logo

email-phone-verification-reactjs-nodejs's Introduction

Email Phone Verification

An application that uses a one-time password (OTP) to validate users' email addresses and phone numbers.
Demo

How it works?

The application uses nodejs and MongoDB in the backend. When the user hits the /register route with his/her email address/phone number

  1. The controller saves the user data in the database.
  2. Generates and saves the OTP with userId in the database.
  3. With help of regular expression, it checks whether the given input is an email address or a phone number and sends the OTP accordingly to it, after that sending back the response to the client.
  4. Client receives OTP, enters it, and hit the /verify route. If it is correct, the controller updates the database. If it is invalid, the controller will inform the client.

Screenshots

  • Default view Default View
  • If user already exists If user already exists
  • Registering a new user Registering a new user

OTP sent to email address OTP on email

If entered the wrong OTP If entered the wrong OTP

Email verified Email verified

  • Same goes for phone number Same goes for phone number

In the database, verified field is updated to true upon successful verification. Database verification

Note: email field in the database is used interchangeably to store email and phone number.

email-phone-verification-reactjs-nodejs's People

Contributors

sachanayush47 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.