-
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
Configure Token provider from the corresponding provider #15627
Conversation
src/OrchardCore/OrchardCore.Users.Core/Extensions/UsersServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
this PR looks ok to me, but it is not solving the issue mentioned here |
@MikeAlhayek could you please address this issue #15585 please |
Co-authored-by: Hisham Bin Ateya <hishamco_2007@yahoo.com>
Co-authored-by: Hisham Bin Ateya <hishamco_2007@yahoo.com>
LGTM if this will not address the @lampersky issue, it would be nice to address the issue in this PR while you're working on this |
@lampersky @hishamco as a bonus, I implemented a fix for #15585 @sebastienros @Piedone let me know your thoughts on these default values for OrchardCore. I think these as okay values to have by default. But, would like to know if you have a better fix default values that you like to change to. New options were added for the email token-providers to give you control on configuring the expiration time on each token sent via email. Here is a list of the available options that you can configure:
|
I'd use the same 15 minutes for
|
Not a bad idea. Changed |
@lampersky your review please before merge |
is it finished? I see new commits each day 😜 |
not ready yet. I am trying to add some tests for the Rfc6238Authentication service. I am not comfortable with the logic. |
Do you need any help? |
@lampersky okay. It's ready now. Feel free to review the code. |
src/OrchardCore/OrchardCore.Users.Core/Services/Rfc6238AuthenticationService.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/TwoFactorAuthenticationStartup.cs
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Views/TemplateUserConfirmEmail.cshtml
Show resolved
Hide resolved
198e586
to
ffcda7e
Compare
This pull request has merge conflicts. Please resolve those before requesting a review. |
Enhanced functionality has been introduced, empowering developers to manage the expiration time of various tokens, including password-reset, email-confirmation, change-email, and two-factor authentication, delivered via the email service. Below, you'll find a list of configurable options along with their default values:
ChangeEmailTokenProviderOptions
EmailConfirmationTokenProviderOptions
PasswordResetTokenProviderOptions
You many change the default values of these options by using the
services.Configure<>
method. For instance, to change theEmailConfirmationTokenProviderOptions
you can add the following code to your projectSecurity Upgrade
This PR also enhance the security of the app by increasing the length of the reset-password token. Currently the rest-password token is only 6 characters in length. With this update, it is a long token and can't be guessed as easy as 6 characters.