Skip to content

Confirmation Mail Token Lifetime #15585

Discussion options

You must be logged in to vote

The Answer was:

@Ian-Risch-Brickmakers Orchard by default is using EmailTokenProvider to generate those tokens which inherits from TotpSecurityStampBasedTokenProvider, those tokens contain only digits and their lifespan is less than 5 minutes. You can read more here. You won't be able to change this lifetime.

I had the same issue in the past and solved it by restoring DefaultProvider. Default provider was removed in this PR. (AddDefaultTokenProviders)

To restore it back you can use this code:

var dataProtectionProviderType = typeof(DataProtectorTokenProvider<>).MakeGenericType(typeof(IUser));
services.AddTransient(dataProtectionProviderType);
services.Configure<IdentityOptions>(options =…

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
7 replies
@Ian-Risch-Brickmakers
Comment options

@lampersky
Comment options

@Ian-Risch-Brickmakers
Comment options

@lampersky
Comment options

@MikeAlhayek
Comment options

Comment options

You must be logged in to vote
3 replies
@MikeAlhayek
Comment options

@lampersky
Comment options

@MikeAlhayek
Comment options

Answer selected by Ian-Risch-Brickmakers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants