/meteor-apollo-two-factor

Two Factor Auth for Meteor accounts in GraphQL

Primary LanguageJavaScript

Two Factor Auth For Meteor

meteor add orionsoft:meteor-apollo-two-factor
yarn add speakeasy qr-image

Only thing you have to do is set the options in meteor settings:

{
  "twoFactor": {
    "issuer": "My App Name",
    "forceLogin": true
  }
}

To manually validate

import {validateTwoFactor} from 'meteor/orionsoft:meteor-apollo-two-factor'

validateTwoFactor(user, token)