I'm using local strategy for authentication purpose using featherjs framework.
Besides username and password auth mechanism, client wants to login using username and OTP. Can someone provide me hint, how can I achieve this? I've studied existing framework featherjs-authentication, I could not understand how can I extend it to support this need.
I could solve the problem using package feathers-authentication-custom
It gives you a hook wherein you can add your auth verifier. In my case, I keep OTP associated with user id. When user calls authenticate with custom strategy, the verifier middleware gets called. Here I verify the OTP and pass back the token to the client.