In the application logs, we are encountering a series of exceptions related to OpenIddict. The practical effect is not visible to the user, except for having to click the login button again to be logged into the system. How can this error be eliminated?
Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions. at Npgsql.EntityFrameworkCore.PostgreSQL.Update.Internal.NpgsqlModificationCommandBatch.ThrowAggregateUpdateConcurrencyExceptionAsync(RelationalDataReader reader, Int32 commandIndex, Int32 expectedRowsAffected, Int32 rowsAffected, CancellationToken cancellationToken) at Npgsql.EntityFrameworkCore.PostgreSQL.Update.Internal.NpgsqlModificationCommandBatch.Consume(RelationalDataReader reader, Boolean async, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable
1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable
1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func
4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Volo.Abp.EntityFrameworkCore.AbpDbContext
1.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)`
I've sent more than one email. Thanks.
We wrote to commercial support with no answers. Help us buy Team license in our current Plan. We need to migrate 5 to 3 users and downgrade current plan. Thanks Michele
I understand, but I also know that real-world applications often use Passwordless authentication with Angular. The first step involves creating a passwordless token and sending it via email, allowing the user to input it on the login page. We have already accomplished this. Now, I believe the next step is to create an authorization token to send back to the Angular application for use, provided that the token is correct. If the bearer token was created by OpenIddict, it should be recognized. Does that sound good to you? If so, how can I obtain a token on the server side within the app service so that I can send it back to the client?
Thanks Michele
We are trying to implement the Passwordless solution, following the guidelines provided at https://community.abp.io/posts/implementing-passwordless-authentication-with-asp.net-core-identity-c25l8koj. However, the solution is for MVC, and we have revised it to work with Angular. The issue is with the login, which, instead of doing this (not works with angular): `
public virtual async Task<IActionResult> Login(string token, string userId)
{
var user = await UserManager.FindByIdAsync(userId);
var isValid = await UserManager.VerifyUserTokenAsync(user, "PasswordlessLoginProvider", "passwordless-auth", token);
if (!isValid)
{
throw new UnauthorizedAccessException("The token " + token + " is not valid for the user " + userId);
}
await UserManager.UpdateSecurityStampAsync(user);
await SignInManager.SignInAsync(user, isPersistent: false);
return Redirect("/");
}
` should obtain an authorization token or something similar. Can you provide us with the code to generate the authentication and enable the login? Thank you.
ABP Framework version: v7.4.2
UI Type: Angular
Database System: EF Core (PostgreSQL)
Integrated OpenIddict Auth Server with Angular
Is it possible to override an AppService and modify its logic without rewriting the entire module? This way, there's no need to modify the form, but all the work can be done on the backend Thank you.
Need to add to Autofac registration in modules to add a decorator, something like: // var builder = new ContainerBuilder(); builder.RegisterType<MyService>().As<IMyService>(); builder.RegisterDecorator<IMyService>((context, inner) => new MyServiceDecorator(inner), fromKeyType: typeof(IMyService));
Tnx
ABP Framework version: v7.3.3
UI Type: Angular
Database System: EF Core (PostgreSQL)
Tiered (for MVC) or Auth Server Separated (for Angular): no
How is it possible to create a new tenant using current form and setting the default connection string programmatically, so as to not expose this information externally? One example could be to use the tenant's name and append it to the current database name. Is this easily doable without re-writing the code for SaaS?
Thank you.
I had seen the answer, but it doesn't seem to address my point. I want the user to input their spoken language in the settings, choosing from those available in ABP. This setting should be saved in their profile, and I need to use it to send emails in the correct language.
Hi, Have you refer this -> https://support.abp.io/QA/Questions/1315/How-can-I-set-default-language-to-FI please check if it helps you.
I need to add the spoken language to the IdentityUser. The user must be able to modify it in the settings, and if they don't, set a default one. How can I implement this function in the current version of ABP? Thank you.