Skip to content

Instantly share code, notes, and snippets.

@woloski
Created March 29, 2019 13:35
Show Gist options
  • Save woloski/f0070020d18a97edd67a29ac604a29da to your computer and use it in GitHub Desktop.
Save woloski/f0070020d18a97edd67a29ac604a29da to your computer and use it in GitHub Desktop.
Pre User Registration hook for Auth0 that block disposable emails
const emailVerifier = require("verifier-node");
module.exports = function (user, context, cb) {
var response = {};
emailVerifier.verify(user.email, context.webtask.secrets.VERIFIER_APIKEY)
.then(response => {
if (!response.valid()) return cb(new Error('Disposable email!'));
response.user = user;
cb(null, response);
});
};
@maclunky
Copy link

Hi, have you a readme on this code? Im looking to get the Verifier_apikey working.

Thank you

Karl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment