How to configure the TokenLifespan of a token generated in .NET Core 3.1? I am using the following code but it's not working and is still using the 1-day TokenLifespan which is the default value.
public void ConfigureServices(IServiceCollection services){
    //...
    services.Configure<DataProtectionTokenProviderOptions>(options =>
    {
        options.TokenLifespan = TimeSpan.FromDays(5);
    });
    //...
}
I am not interested in configuration through custom classes when there is a builtin option to change it through the code given above but I don't know what am I doing wrong which is overriding my defined TokenLifeSpan value.