hi
You can't get the access_token
from httpcontext
in your blazor
project by default.
Because your situation does not match our design.
You can request the auth server get a new access_token and set it to request in your custom HttpContextIdentityModelRemoteServiceHttpClientAuthenticator
https://github.com/abpframework/abp/blob/rel-7.2/modules/openiddict/app/OpenIddict.Demo.Client.Console/Program.cs#L22-L32
If you still want to call the API
You can add AbpHttpClientIdentityModelWebModule
module to your blazor project and override the HttpContextIdentityModelRemoteServiceHttpClientAuthenticator
to return an access_token
.
https://github.com/abpframework/abp/blob/rel-7.2/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo/Abp/Http/Client/IdentityModel/Web/HttpContextIdentityModelRemoteServiceHttpClientAuthenticator.cs#L37-L46
hi
that you call the interface on the Blazor page.
this means the tiered
blazor app which is a pure UI project, your blaozr includes openiddict, account etc, and it is not a UI project.
hi
Can you share a simple project to reproduce this?
liming.ma@volosoft.com
hi
In this case, you shouldn't call the API from the blazor(it's a auth server project)
hi
After the blazer server is deployed through nginx
Is your website deployed as https
?
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-7.0&tabs=linux-ubuntu
Can you share an online URL?
liming.ma@volosoft.com
hi
Can you share the logs?
Can you share the csporj
file of your web project which include this page?
Is this page an MVC page?
hi
It depends on whether your mail provider provides the relevant API(send/receive). You can freely use its API in abp to send and receive emails.
hi
https://github.com/abpframework/abp/blob/issue-18042/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/DefaultHttpExceptionStatusCodeFinder.cs#L72
service.hi
app.Use((httpContext, next) =>
{
httpContext.Request.Scheme = "https";
return next();
});
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-7.0#when-it-isnt-possible-to-add-forwarded-headers-and-all-requests-are-secure