All Projects → iAmShakil → dbless-email-verification

iAmShakil / dbless-email-verification

Licence: MIT license
Verify user email without database using cryptography

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to dbless-email-verification

hunter
🐺 Command-line application and golang client library for hunter.io
Stars: ✭ 28 (+12%)
Mutual labels:  email-verification
laravel-email-verification-app-boilerplate
Laravel app boilerplate with email verification process on registration
Stars: ✭ 41 (+64%)
Mutual labels:  email-verification
reacher-js
TypeScript wrapper library over Reacher API
Stars: ✭ 24 (-4%)
Mutual labels:  email-verification
Moonmail
Email marketing platform for bulk emailing via Amazon SES (Google Cloud Platform and Azure coming soon)
Stars: ✭ 1,766 (+6964%)
Mutual labels:  email-verification
NeverBounceAPI-PHP
This package provides convenient methods to integrate the NeverBounce API into your project.
Stars: ✭ 22 (-12%)
Mutual labels:  email-verification
mini-project
An android eCommerce application for students through which they can buy and sell used goods .
Stars: ✭ 26 (+4%)
Mutual labels:  email-verification
django-rest-email-auth
Django app to handle authentication and registration by email.
Stars: ✭ 13 (-48%)
Mutual labels:  email-verification
parse-server-simple-mailgun-adapter
Used to send Parse Server password reset and email verification emails though Mailgun
Stars: ✭ 81 (+224%)
Mutual labels:  email-verification
email-checker
Provides email verification on the go.
Stars: ✭ 116 (+364%)
Mutual labels:  email-verification
Nestjs-Typeorm-Auth
NestJS + Typeorm codebase containing a full authentification system with roles, sessions and email verification.
Stars: ✭ 37 (+48%)
Mutual labels:  email-verification
Facebook-account-kit-android
Android app uses FACEBOOK's ACCOUNT KIT to login without password with EMAIL or PHONE.
Stars: ✭ 30 (+20%)
Mutual labels:  email-verification
Django-Verify-Email
A two-step verification for new accounts by verifying email.
Stars: ✭ 51 (+104%)
Mutual labels:  email-verification
node-identif
🔑 Helper class to verify one's identity via personal channels(SMS, Phone, E-Mail and more!)
Stars: ✭ 27 (+8%)
Mutual labels:  email-verification
node-email-verifier
The best possible way to verify and validate an email address.
Stars: ✭ 38 (+52%)
Mutual labels:  email-verification

dbless-email-verification

build status code coverage license npm downloads

Table of Contents

Install

npm:

npm install dbless-email-verification

yarn:

yarn add dbless-email-verification

Details:

This package eliminates the need for storing and querying a token in the database for verifying an email.

generateVerificationHash

Generate a hash for the email id using the exported generateVerificationHash function and send a verification link containing the hash to that email. The verification url in the email would have a struture similar to this https://yourdomain.com/verifyemail/?&[email protected]&verificationHash=5b1c6fab1937fdb9654879c73218d6a6142c614c8e347b45105cb50f2aea9949.1570901998569

Argument Required default Description
email true N/A Email to verify
secret true N/A A strong and unique secret key
expiry false 5 For how long the hash should remain valid in minutes. Expressed in minutes.

verifyHash

Pass the email and verification hash extracted from the url to the exported verifyHash function. The function returns true if the email is verified and false if not.

Argument Required default Description
hash true N/A Extracted hash from the url
email true N/A Email to verify
secret true N/A The secret used in the generateVerificationHash function

Usage

Generating hash

const { generateVerificationHash } = require('dbless-email-verification');
const hash = generateVerificationHash('[email protected]', 'useyourownsecrethere', 10)
// add the email and generated hash to the verification link

Verifying the hash

const { verifyHash } = require('dbless-email-verification')
// assuming the hash extracted from the verification url is stored in the verificationHash variable
const isEmailVerified = verifyHash(verificationHash, '[email protected]', 'useyourownsecrethere')

Credits

This package is influenced by the following npm package and is adopted for a more specific use case https://www.npmjs.com/package/otp-without-db

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].