hi
When I created scheduled job and it was executed it doesn't work as expected. It doesn't have the correct context - TenantId is null.
Please share your code.
Thanks
hi
I have no experience with New-SelfSignedCertificate command.
: )
hi
You can make a post to your oauth2/auth server to get access_token by username and password.
https://github.com/abpframework/abp/blob/dev/modules/openiddict/app/OpenIddict.Demo.Client.Console/Program.cs#L6-L42 https://www.oauth.com/oauth2-servers/access-tokens/password-grant/
We don't have much experience with mobile OAuth2.
Congrats
hi
Can you confirm if the Projects.Projects.View has been granted to your current user?
You can clear Redis to make sure the cache has no wrong data.
Authorization failed. These requirements were not met: PermissionRequirement: Projects.Projects.View
And can you share the access_token of the HTTP request header?
You need to depend on the AbpAccountPublicApplicationModule.
hi
You can refer to the professional document.
https://oauth.net/2/native-apps/
public override void PreConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
PreConfigure<OpenIddictBuilder>(builder =>
{
builder.AddValidation(options =>
{
options.AddAudiences("MyProjectName");
options.UseLocalServer();
options.UseAspNetCore();
});
});
if (!hostingEnvironment.IsDevelopment())
{
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options =>
{
options.AddDevelopmentEncryptionAndSigningCertificate = false;
});
PreConfigure<OpenIddictServerBuilder>(serverBuilder =>
{
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000");
serverBuilder.SetIssuer(new Uri(configuration["AuthServer:Authority"]!));
});
}
}
In the production environment, you need to use a production signing certificate. ABP Framework sets up signing and encryption certificates in your application and expects an openiddict.pfx file in your application.
This certificate is already generated by ABP CLI, so most of the time you don't need to generate it yourself. However, if you need to generate a certificate, you can use the following command:
dotnet dev-certs https -v -ep openiddict.pfx -p 00000000-0000-0000-0000-000000000000
00000000-0000-0000-0000-000000000000is the password of the certificate, you can change it to any password you want.
It is recommended to use two RSA certificates, distinct from the certificate(s) used for HTTPS: one for encryption, one for signing.
For more information, please refer to: https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html#registering-a-certificate-recommended-for-production-ready-scenarios
Also, see the Configuring OpenIddict documentation for more information.