-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Use MinimalAPI for two-factor authentication code request #16174
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems you started using Minimal APIs, we could decide if can use them across the modules
src/OrchardCore.Modules/OrchardCore.Users/TwoFactorAuthenticationStartup.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Controllers/TwoFactorAuthenticationController.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Endpoints/EmailAuthenticator/SendCode.cs
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Endpoints/EmailAuthenticator/SendCode.cs
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Endpoints/EmailAuthenticator/SendCode.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Endpoints/EmailAuthenticator/SendCode.cs
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Endpoints/SmsAuthenticator/SendCode.cs
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Endpoints/SmsAuthenticator/SendCode.cs
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/TwoFactorAuthenticationStartup.cs
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/TwoFactorAuthenticationStartup.cs
Show resolved
Hide resolved
Co-authored-by: Hisham Bin Ateya <[email protected]>
src/OrchardCore.Modules/OrchardCore.Users/TwoFactorAuthenticationStartup.cs
Outdated
Show resolved
Hide resolved
@hishamco, MinimalAPIs are great when possible. One on their advantage over using controllers is that the reduce the overhead and they are executed early on in the request which add a slightly better performance and less resources. Any route that is acting like a REST request can/should be processed using a MinimalAPI. The two route in this PR are perfect candidates for using MinimalAPI. |
Switch the 2FA code requests to use MinimalAPI