Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/Identity/Core/src/SignInManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,14 @@ public virtual async Task<bool> CanSignInAsync(TUser user)
}

/// <summary>
/// Signs in the specified <paramref name="user"/>, whilst preserving the existing
/// Refreshes the sign-in for the specified <paramref name="user"/>, whilst preserving the existing
/// AuthenticationProperties of the current signed-in user like rememberMe, as an asynchronous operation.
/// </summary>
/// <param name="user">The user to sign-in.</param>
/// <remarks>
/// The user must already be signed in, and the user ID must match the currently authenticated user.
/// If the user is not signed in, use <see cref="SignInAsync(TUser, bool, string?)"/> instead.
/// </remarks>
/// <param name="user">The user to refresh the sign-in for.</param>
/// <returns>The task object representing the asynchronous operation.</returns>
public virtual async Task RefreshSignInAsync(TUser user)
{
Expand Down Expand Up @@ -204,8 +208,8 @@ public virtual async Task RefreshSignInAsync(TUser user)
}

IList<Claim> claims = Array.Empty<Claim>();
var authenticationMethod = auth.Principal?.FindFirst(ClaimTypes.AuthenticationMethod);
var amr = auth.Principal?.FindFirst("amr");
var authenticationMethod = auth.Principal.FindFirst(ClaimTypes.AuthenticationMethod);
var amr = auth.Principal.FindFirst("amr");

if (authenticationMethod != null || amr != null)
{
Expand All @@ -221,7 +225,7 @@ public virtual async Task RefreshSignInAsync(TUser user)
}

await SignInWithClaimsAsync(user, auth.Properties, claims);
return (true, auth.Properties?.IsPersistent ?? false);
return (true, auth.Properties.IsPersistent);
}

/// <summary>
Expand Down
Loading