Using meteor useraccounts package, I would like to add a custom field in signIn
form (named token
) to enable 2fa authentication.
Unfortunatly on AccountTemplates.addField
only work with signUp
form, as far as I have worked on it.
Any hint?
The answer i managed to implement was to change the pattern with a different approach, using directly Meteor API:
tokenverified: false
Meteor.onLogin
(called each time you login or refresh manually the page) and Meteor.onLogout
callback to set this field to falseverify2FA
to deal with token and set tokenverified: true
ensure2FA
that will check this token and redirect to the verify2FA
template.