hi
Can you SetIssuer to https website url?
public override void PreConfigureServices(ServiceConfigurationContext context)
{
//...
PreConfigure<OpenIddictServerBuilder>(serverBuilder =>
{
serverBuilder.SetIssuer(new Uri(configuration["AuthServer:Authority"]!));
});
//...
}
hi
You can also try to set ctx.Request.Scheme to https if your app is behind an HTTPS reverse proxy.
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
app.Use((ctx, next) =>
{
ctx.Request.Scheme = "https";
return next();
});
/...
Thanks.
hi
dynamic claim impact to Access Token lifetime?
The RemoteRefreshUrl default value will be JwtBearerOption.Authority + "/api/account/dynamic-claims/refresh"
Dynamic will not change the access token lifetime. But it will make the current login state invalid if the API can't reach the AuthServer.
Therefore, your API website must communicate with the AuthServer website using RemoteRefreshUrl.
Thanks.
hi
Can you try to override CreateUserAsync and UpdateUserAsync methods of ExternalLoginProviderBase?
https://github.com/abpframework/abp/blob/rel-8.0/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/ExternalLoginProviderBase.cs#L37-L157
Thanks.
hi
1, Add AbpHttpClientIdentityModelWebModule to your ApplicationBlazorModule
2, Add AbpCachingStackExchangeRedisModule to your BackendHttpApiHostModule
3, Update BackendHttpApiHostModule's ConfigureAuthentication as below:
private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)
{
Configure<AbpDistributedCacheOptions>(options =>
{
options.KeyPrefix = "AuthServer:";
});
context.Services.ForwardIdentityAuthenticationForBearer(OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme);
context.Services.Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
});
}
Your Blazor and API need to enable the Redis and use the same KeyPrefix.
Thanks.
hi
Can you share the logs.txt from the Development and Production environments?
Also, the API startup module code.
liming.ma@volosoft.com
Thanks.