Simple two-factor authentication for Feathers using time-based one-time passwords (TOTP) aka "2FA with Authenticator apps".
This package provides a Feathers hook, which adds TOTP two-factor authentication (2FA) functionality to the authentication process. Secret generation and token verification is performed using the otplib library.
The current version is tested with the Local Authentication strategy of Feathers and with Microsoft's and Google's Authenticator apps.
This package is still work in progress! It is not recommended to use it in production.
npm i feathers-totp-2fa
- Add tests,
- Make 2FA optional, e.g. by a boolean
totp2FaRequired
value in the user model, - Add an option for the users service name,
- Add an option for the name of the
totpSecret
field name, - Add an option for the app name (shown in Authenticator app),
- Replace
speakeasy
withotplib
- Add an option for the secret encoding,
- Add an option for the encryption method,
- Add an option for the expiration date of the secret (useful? TBD).
See the documentation for more details about the configuration and usage of this package.
Copyright (c) 2022
Licensed under the MIT license.