Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft]Edit user page to be possible to add 2FA #130

Open
FelipePSoares opened this issue Oct 14, 2024 · 7 comments
Open

[Draft]Edit user page to be possible to add 2FA #130

FelipePSoares opened this issue Oct 14, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@FelipePSoares
Copy link
Owner

No description provided.

@FelipePSoares FelipePSoares changed the title Edit user page to user be able to add 2FA Edit user page to be possible to add 2FA Oct 14, 2024
@FelipePSoares FelipePSoares added the enhancement New feature or request label Oct 18, 2024
@Dan-613
Copy link
Contributor

Dan-613 commented Nov 7, 2024

@FelipePSoares Forgive me, I'm trying to work out how you create a database migration in your project. Are you able to let me know?

@FelipePSoares
Copy link
Owner Author

@Dan-613 sorry I didn't plan this issue yet. I just create to don't forget. But answering your question.

To create a migration you need to build the project in release and then run the command appoint to persistence project then because exist 2 contexts you need to select the correct context.

Add-Migration {migration name} -Context EasyFinanceDatabaseContext

@FelipePSoares
Copy link
Owner Author

But I was thinking now, you don't need to change anything in the background to use 2FA. Because I'm using the C# default implementation and all the endpoints to use 2FA is ready created.

@Dan-613
Copy link
Contributor

Dan-613 commented Nov 7, 2024

Using google authenticator compatible 2FA, I was planning on storing the 2fa secret key per-user so that it is defined on the fly and therefore doesn't need to be configured and stored within the code or during provisioning. So I was going to add the field string User.TwoFactorSecret

@FelipePSoares
Copy link
Owner Author

But this is exactly what is defined today, there is a field to save the code, isn't?

image

@Dan-613
Copy link
Contributor

Dan-613 commented Nov 8, 2024

Ah. I didn't realise the field already existed in ef.

@FelipePSoares
Copy link
Owner Author

But to be honest I don't know exactly how it works, because it's the new .net core 8 authentication. It's the first time that I'm using.

I just added this configuration and it created every register, login and logout endpoint.

image

@FelipePSoares FelipePSoares changed the title Edit user page to be possible to add 2FA [Draft]Edit user page to be possible to add 2FA Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants