Skip to content

Commit 8433b2b

Browse files
authored
User invite email fails if visited more than once without completing (#17901)
Don't change securitystamp until user created
1 parent 87b2153 commit 8433b2b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Umbraco.Web.BackOffice/Controllers/BackOfficeController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,12 @@ public async Task<IActionResult> VerifyInvite(string invite)
230230

231231
// sign the user in
232232
DateTime? previousLastLoginDate = identityUser.LastLoginDateUtc;
233+
var securityStamp = identityUser.SecurityStamp;
233234
await _signInManager.SignInAsync(identityUser, false);
234235

235-
// reset the lastlogindate back to previous as the user hasn't actually logged in, to add a flag or similar to BackOfficeSignInManager would be a breaking change
236+
// reset the lastlogindate and securitystamp back to previous as the user hasn't actually logged in, to add a flag or similar to BackOfficeSignInManager would be a breaking change
236237
identityUser.LastLoginDateUtc = previousLastLoginDate;
238+
identityUser.SecurityStamp = securityStamp;
237239
await _userManager.UpdateAsync(identityUser);
238240

239241
return RedirectToLogin(new { flow = "invite-user", invite = "1" });

0 commit comments

Comments
 (0)