Replies: 5 comments 3 replies
-
Indeed 2FA would be valuable to get "out of the box" in feathers. ..Just like other two-step changes such as password reset and signup confirm emails. And these we implemented ourselves with hooks:
The advantage of this method that we can use it for any kind of two-step approach, email confirm, 2FA and others. And it is not anti-pattern to feathers, I think...) |
Beta Was this translation helpful? Give feedback.
-
Few extras:
i.e.
|
Beta Was this translation helpful? Give feedback.
-
IMHO, there are software (Saas or self-hosted) that handle that well and which follow the OpenID Connect/OAuth2 protocol that are standards now. |
Beta Was this translation helpful? Give feedback.
-
Then you should give Keycloak a try, you can customize the email templates and it has everything I mentioned. The big advantage to me is that you have one service that do the authentication that can be reused in almost any other projects, with or without a front-end, so you don't have to reconfigure/re-implement each time. You can even externalize the jwt verification at the reverse proxy level with the caddy-auth-jwt plugin or oauth2-proxy. |
Beta Was this translation helpful? Give feedback.
-
I've been thinking about what a good flow for 2-factor verifications, the problem is that it has a long tail of other things you will have to set up (authenticator, SMS or email service, a protected URL to render the authenticator QR code and probably a bunch more). I still can't shake the feeling that by now the whole authentication space in general has become so complex that it is almost impossible to cover it all in an open source project. Firebase and Cognito are run by the two most valuable companies in the world. Auth0 addresses basically most of the exact same problems and recently sold for 6.5 Billion (!) dollars. I mention this because it kind of gives a reference to the scope of the problem space (even if individual features might look easy to implement). Personally I'd love to throw all that legacy cruft out of the window and just provide
|
Beta Was this translation helpful? Give feedback.
-
Just throwing down some thoughts...
Looks like feathers doesn't support 2FA very well. (cough #1601 cough)
In fact, sometimes authentication requires several steps, like email/phone validation or suspicious login requiring a reCaptcha.
What would be nice is taking a generalised approach for the backend to "challenge" someone's login request.
Basically, when doing normal authentication, flag the login as needing a challenge, and instead of returning a fully-fledged accessToken, instead return a challenge JWT, which is then returned when calling authenticate again with the strategy being the challenge.
Something like:
What would also be cool is feathers having "out-of-the-box" support for Authenticator App 2FA.
Beta Was this translation helpful? Give feedback.
All reactions