passwordless-mailer

0.0.1 • Public • Published

passwordless-mailer

Sends passwordless emails in your site

Inspired By

florianheinemann/passwordless

Usage

var passwordless = require('passwordless-mailer')
 
var mailConf = require('./private/mail-conf')
var site = 'Facebook'
var prefix = 'http://facebook.com/login?a=1&b=2&token='
passwordless.setup(site, prefix, mailConf)
 
app.get('/passwordless', function(req, res){
  var email = req.query['email']
  var token = bindToken(email)
  passwordless.send(email, token, function(err, info){
    // stuff..
  })
})
 
app.get('/login', function(req, res){
  var token = req.query['token']
  var email = checkToken(token)
  // stuff..
})

Todo

  • Beautify email content
  • Custom email content
  • Multiple instances
  • Custom link url
  • More..

Readme

Keywords

none

Package Sidebar

Install

npm i passwordless-mailer

Weekly Downloads

1

Version

0.0.1

License

none

Last publish

Collaborators

  • fritx