Identity Server 4 + Asp.Net Core Identity. Authorize with PIN

Viewed 370

I am writing my custom IdentityService that uses Identity Server 4 & Asp.Net Core Identity for users & passwords validation. But I have 2 versions of apps to support: mobile and web. In terms of authorization, customers want to allow usage of PIN in mobile app only and to use passwords in the web app. The problem is that one specific role might have access to mobile with the PIN but might not be initialized with the password. As I understand I need to make PIN validation in the same manner as password validation.

I would like to use Asp.Net Core Identity but haven't found any proper samples of how to do what is necessary for me.

Will be glad for any help.

1 Answers

Actually, we've found a pretty nice way (at least suitable for our needs :)). Identity server has validators that you might write yourself to validate password creation/access etc. We have written such manually. The second part was to attach the PIN Code and Password to the one user. Extending UserManager (.Net Core Identity) helped us to update PINs in the same way as we did with passwords. 3rd step was about security: we've tried to avoid login in to the same app using different ways. We just considered if the domain relates to the mobile app, then we were going to authenticate the user with a PIN. Of course, there is much fewer data visualized on mobile, which makes it pros as well.

Related