Skip to content

Angular sample client app - #5

Open
kjartanvalur wants to merge 9 commits into
davidfowl:mainfrom
kjartanvalur:main
Open

Angular sample client app#5
kjartanvalur wants to merge 9 commits into
davidfowl:mainfrom
kjartanvalur:main

Conversation

@kjartanvalur

Copy link
Copy Markdown
Contributor

Added an Angular sample app that tests all features

@kjartanvalur

kjartanvalur commented Jul 22, 2023

Copy link
Copy Markdown
Contributor Author

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.

@kjartanvalur

Copy link
Copy Markdown
Contributor Author

image

@kjartanvalur

Copy link
Copy Markdown
Contributor Author

@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

@davidfowl

Copy link
Copy Markdown
Owner

Yep I’ll merge it. I’d like to make sure we can support a react sample as well though

@kjartanvalur

Copy link
Copy Markdown
Contributor Author

@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.

@kjartanvalur

Copy link
Copy Markdown
Contributor Author

@davidfowl
Any changes you would like to see?

Kjartan Valur Þórðarson added 2 commits August 9, 2023 08:59
@kjartanvalur

Copy link
Copy Markdown
Contributor Author

I updated to Preview 7 the register page to support email and username

@kjartanvalur

kjartanvalur commented Aug 9, 2023

Copy link
Copy Markdown
Contributor Author

@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?

@davidfowl

Copy link
Copy Markdown
Owner

cc @halter73

@halter73

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants