hi
Can you share your email configuration?
liming.ma@volosoft.com
I will test it in 9.0.4
hi
You can test your email configuration by this sample.
Thanks.
https://github.com/abpframework/abp-samples/tree/master/EmailSendDemo
hi
Please check and share the Debug logs of this reqeust.
https://abp.io/support/questions/8622/How-to-enable-Debug-logs-for-troubleshoot-problems
hi
how can I programmatically revoke user sessions?
There are few method to revoke session in IdentitySessionManager
, You can inject it then call the revoke method.
RevokeAsync(Guid id)
RevokeAsync(string sessionId)
RevokeAsync(IdentitySession session)
RevokeAllAsync(Guid userId, Guid? exceptSessionId = null)
RevokeAllAsync(Guid userId, string device, Guid? exceptSessionId = null)
hi
To reproduce as I noticed: you wait (without any actions somtimes) till Token expired but not the cookie,
The CheckTokenExpiration
method will check your access_token. It will log out the cookies if the token is invalid.
Can you set a breakpoint on this method to see what happened?
https://github.com/abpframework/abp/blob/3616e843cfdee671317941fe5b478c1c8bd180df/framework/src/Volo.Abp.AspNetCore/Microsoft/Extensions/DependencyInjection/CookieAuthenticationOptionsExtensions.cs#L37-L77
Thanks.
Many Thanks Giuseppe
hi
I tried to change cookie and Token configs but still face it.
Do you mean this?
https://abp.io/docs/latest/modules/openiddict-pro#setting-tokens-lifetime
Can you try to call CheckTokenExpiration
in AddCookies
?
context.Services.AddAuthentication(options =>
{
options.DefaultScheme = "Cookies";
options.DefaultChallengeScheme = "oidc";
})
.AddCookie("Cookies", options =>
{
options.ExpireTimeSpan = TimeSpan.FromDays(365);
options.CheckTokenExpiration();
})
.AddAbpOpenIdConnect("oidc", options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = configuration.GetValue<bool>("AuthServer:RequireHttpsMetadata");
hi
Try the new TranslateParameterizedCollectionsToConstants
Configure<AbpDbContextOptions>(options =>
{
options.Configure(actions =>
{
actions.UseSqlServer(o => o.TranslateParameterizedCollectionsToConstants());
actions.DbContextOptions.EnableSensitiveDataLogging();
});
});
see https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-8.0/breaking-changes#mitigations
hi
What’s your sql server version? What’s your abp package version? 8.x or 9.x?
Thanks.