Skip to content

Commit

Permalink
add no tracking to otp confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
emrecoskun705 committed Sep 23, 2023
1 parent 2c8bfb7 commit bdb1146
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Unitagram.Identity/IdentityServiceRegistration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static IServiceCollection AddIdentityServices(this IServiceCollection ser
options.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromMinutes(3); // Lockout duration (3 minutes)
options.Lockout.MaxFailedAccessAttempts = 8; // Maximum failed attempts before lockout (8 attempts)

options.SignIn.RequireConfirmedEmail = true;
// options.SignIn.RequireConfirmedEmail = true;
// options.Tokens.EmailConfirmationTokenProvider = "emailconfirmation";
})
.AddEntityFrameworkStores<UnitagramIdentityDbContext>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public OtpConfirmationRepository(UnitagramDatabaseContext context) : base(contex
{
var otpConfirmation = await _context.OtpConfirmation
.Where(o => o.UserId == userId && o.Name == name)
.AsNoTracking()
.FirstOrDefaultAsync();

return otpConfirmation;
Expand Down

0 comments on commit bdb1146

Please sign in to comment.