Two factor authentication?
kjartanvalur opened this issue · 3 comments
Hi
Thanks for this awesome code sample.
Do you think it´s possible to add two factor authentication via SMS or Email?
Hi @kjartanvalur - thanks for the feedback. Re: two factor authentication this demo could be extending very easily to include that. In fact, you can get the code to plug in by creating a new asp.net mvc web application, include authentication -> "Individual User Accounts" that project template creates a very rich AccountsController for you with 2fa, password reset etc... I just pasted into this gist: https://gist.github.com/mmacneil/e7e234569802e74e93500bf2abee98dc#file-cs
That should have everything you need to implement 2fa in your demo project.
Regards,
Mark
Hi
Thanks for this info. I had already noticed this template but I´m not interested using Razor pages or MVC. I´m trying to do this with pure REST and Angular.
Any thoughts on that?
Yes, so you don't need to use razor/mvc - that example shows you most of the logic/workflow which you should be able to port (relatively) easily into your restful api to do 2fa. You should be able to ignore the mvc bits (ie. don't review View()) - see the LoginWith2fa() actions.
Hope this helps.
Mark