feathers-totp-2fa
v0.5.1
Published
TOTP Two Factor Authentication for Feathers Apps
Maintainers
Readme
feathers-totp-2fa
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.
Installation
This package is still work in progress! It is not recommended to use it in production.
npm i feathers-totp-2faTodos (contributions welcome!)
- [x] Add tests,
- [x] Make 2FA optional, e.g. by a boolean
totp2FaRequiredvalue in the user model, - [x] Add an option for the users service name,
- [x] Add an option for the name of the
totpSecretfield name, - [x] Add an option for the app name (shown in Authenticator app),
- [x] Replace
speakeasywithotplib - [x] Add an option for the secret encoding,
- [x] Add an option for the encryption method,
- [ ] Add an option for the expiration date of the secret (useful? TBD).
Documentation
See the documentation for more details about the configuration and usage of this package.
License
Copyright (c) 2022
Licensed under the MIT license.
