hi
Option A: Admin creates user under a specific tenancy (optionally with user changes password on login) User is emailed to say an account is created for them including their password.
You can easy to do this option.
Create a user under a specific tenant and mail to the email of the new user.
https://docs.abp.io/en/abp/latest/Multi-Tenancy#change-the-current-tenant https://docs.abp.io/en/abp/latest/Emailing
We added User must change password at next login
feature on 7.2
hi
You can download the account pro source code.
abp get-source Volo.Account.Pro
https://support.abp.io/QA/Questions/632/How-can-I-download-the-source-code-of-the-framework-Angular-packages-theme-and-pro-modules
hi
Please try using CheckExpiresAt
with AddCookie
.
context.Services.AddAuthentication(options =>
{
//...
})
.AddCookie("Cookies", options =>
{
options.ExpireTimeSpan = TimeSpan.FromDays(365);
options.CheckExpiresAt();
})
.AddAbpOpenIdConnect("oidc", options =>
{
//...
});
using System;
using System.Globalization;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
namespace MyCompanyName.MyProjectName.Web;
public static class CookieAuthenticationOptionsExtensions
{
public static CookieAuthenticationOptions CheckExpiresAt(this CookieAuthenticationOptions options)
{
var originalHandler = options.Events.OnValidatePrincipal;
options.Events.OnValidatePrincipal = async principalContext =>
{
originalHandler?.Invoke(principalContext);
if (principalContext.Principal != null && principalContext.Principal.Identity != null && principalContext.Principal.Identity.IsAuthenticated)
{
var tokenExpiresAt = principalContext.Properties.Items[".Token.expires_at"];
if (tokenExpiresAt != null &&
DateTimeOffset.TryParseExact(tokenExpiresAt, "yyyy-MM-ddTHH:mm:ss.fffffffzzz", null, DateTimeStyles.AdjustToUniversal, out var expiresAt) &&
expiresAt < DateTimeOffset.UtcNow.Subtract(TimeSpan.FromMinutes(5)))
{
principalContext.RejectPrincipal();
await principalContext.HttpContext.SignOutAsync(principalContext.Scheme.Name);
}
}
};
return options;
}
}
hi
I will confirm this.
hi
You can try the latest template project to see if it is slow too.
If only happened on your project you can find a way to reproduce and share a simple project. We can check and resolve it in short time.
hi trendline
You can share it when you are able to reproduce this problem.
hi
We will suppress this message in the next version. Your question credits were refunded.
hi
How can I reproduce it in a new template project?
Can you share a screenshot?
hi
What kind of the logs you got now?