hi
Yes.
Do you mean that after clicking Logout on the web website, you are redirected to the public website?
My workflow is something like this
app.Use(async (httpContext, next) =>
{
var currentUser = httpContext.RequestServices.GetRequiredService();
if (currentUser.IsInRole("PublicUser"))
{
//redirect ...
return;
}
await next();
});
"
error user get when click logout after redirect
"error:invalid_request
error_description:The client application is not allowed to use the specified identity token hint.
error_uri:https://documentation.openiddict.com/errors/ID2141"
hi
Yes.
Do you mean that after clicking Logout on the web website, you are redirected to the public website?
My workflow is something like this
After reviewing your changes i have few questions-
app.UseAuthentication();
app.Use(async (httpContext, next) =>
{
var currentUser = httpContext.RequestServices.GetRequiredService();
if (currentUser.IsInRole("user") && currentUser.Roles.Length == 1)
{
// publicURL =
httpContext.Response.Redirect("https://localhost:44359/");
return;
}
await next();
});
thanks please let me know when its done
sorry but i cant share my project but you can add code on any ABP tiered application (MVC) or you can use https://github.com/adityanbajpai/AbpPayment to test
can you please provide a sample code on how to do it in abp application
d
did't get it can you please explain it with sample code currently i am doing this
app.UseAuthentication();
app.Use(async (httpContext, next) =>
{
var currentUser = httpContext.RequestServices.GetRequiredService<ICurrentUser>();
if (currentUser.IsInRole("user") && currentUser.Roles.Length == 1)
{
// publicURL =
httpContext.Response.Redirect("https://localhost:44359/");
return;
}
await next();
});
Hi,
if If the current request is to logout, then do not redirect
is there any other way to check user is public so instead of direct redirect ican logout that user first then redirect
Hi,
could you share your middleware code?
Nothing is changed all code is default generated code by template. And on top of that issue is with abpsuite also. If it is solved for abpsuite i believe it will be fixed in my application also.