I found detail error is The antiforgery cookie token and request token do not match.
hi
Please share the full logs, thanks
Thanks, I will confirm this.
hi shailendra
It is a 7.0 microservice template right?
hi
I see the question has bee closed. Did you resolve the problem?
hi
You need to use PreConfigure method.
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<IdentityBuilder>(identityBuilder =>
{
identityBuilder.AddSignInManager<CustomSignInManager>();
});
}
Can you share the code of CustomSignInManager?
hi
[ExposeServices(typeof(CustomLoginModel), typeof(IdentityServerSupportedLoginModel))]
public class CustomLoginModel : IdentityServerSupportedLoginModel
{
private readonly ITenantRepository _tenantRepository;
public CustomLoginModel(
IAuthenticationSchemeProvider schemeProvider,
IOptions<AbpAccountOptions> accountOptions,
IAccountExternalProviderAppService accountExternalProviderAppService,
IIdentityServerInteractionService interaction,
IClientStore clientStore, IEventService identityServerEvents,
ICurrentPrincipalAccessor currentPrincipalAccessor,
IAbpRecaptchaValidatorFactory recaptchaValidatorFactory,
IOptions<IdentityOptions> identityOptions,
IOptionsSnapshot<reCAPTCHAOptions> reCaptchaOptions)
: base(schemeProvider,
accountOptions,
accountExternalProviderAppService,
interaction,
clientStore,
identityServerEvents,
currentPrincipalAccessor,
recaptchaValidatorFactory,
identityOptions,
reCaptchaOptions)
{
}
}
hi
Ii's better to use a template project to reproduce the problem.
hi jlavallet
I will check your project.
The cshtml and javascript code are below.
<abp-card-title>@L["LoggedOutTitle"]</abp-card-title>
<abp-card-text>@L["LoggedOutText"]</abp-card-text>
@if (Model.PostLogoutRedirectUri != null)
{
<a abp-button="Primary" id="redirectButton" href="@Html.Encode(Model.PostLogoutRedirectUri)" cname="@Model.ClientName">@L["ReturnToText"]</a>
}
@if (Model.SignOutIframeUrl != null)
{
<iframe class="signout logoutiframe" src="@Html.Encode(Model.SignOutIframeUrl)"></iframe>
}
document.addEventListener("DOMContentLoaded", function (event) {
setTimeout(function () {
window.clientName = document.getElementById("redirectButton").getAttribute("cname");
window.location = document.getElementById("redirectButton").getAttribute("href");
}, 3000)
});