Angular sample client app
Added an Angular sample app that tests all features
Needed to add CORS config to allow the angular client to call the api. But somehow not all code came through yesterday. Added the code now. Thanks @davidfowl for this repo.
@davidfowl Is this something you would consider merging? I can see other sample clients being added here in the future. And implement Two Factor Authentication when that comes out in the next Preview version of Dotnet8
Yep I’ll merge it. I’d like to make sure we can support a react sample as well though
@davidfowl I merged with the latest base branch. It´s really easy to add another client later like React. I added this into an Clients folder.
@davidfowl Any changes you would like to see?
I updated to Preview 7 the register page to support email and username
@davidfowl Can you point me in the right direction to enable two-factor authentication now that Preview 7 is out? Is it possible to enforce two-factor auth or is it only an opt-in feature for the user with a specific update function that updates the users table? Is it possible to catch when the user calls the register API (or any other) and do something else in the process?
cc @halter73
Is it possible to enforce two-factor auth or is it only an opt-in feature for the user with a specific update function that updates the users table? Is it possible to catch when the user calls the register API (or any other) and do something else in the process?
Right now, the user needs to opt into 2fa, but you can configure an authorization policy that requires the TwoFactorEnabled claim to be true using an authorization policy. See https://stackoverflow.com/questions/68920518/how-to-enforce-2fa-in-my-net-core-identity-web-app.
I don't think there's a good way to make login fail until 2fa is configured though. This is also a problem with Identity UI, but that's easier to scaffold and customize.