public override async Task RefreshSignInAsync()

in src/Amazon.AspNetCore.Identity.Cognito/CognitoSigninManager.cs [210:229]


        public override async Task RefreshSignInAsync(TUser user)
        {
            var result = await user.StartWithRefreshTokenAuthAsync(
                new InitiateRefreshTokenAuthRequest()
                {
                    AuthFlowType = AuthFlowType.REFRESH_TOKEN
                }
                ).ConfigureAwait(false);

            var auth = await Context.AuthenticateAsync(IdentityConstants.ApplicationScheme);
            var authenticationMethod = auth?.Principal?.FindFirstValue(ClaimTypes.AuthenticationMethod);
            var properties = auth?.Properties;
            if (properties != null)
            {
                AddUserTokensToAuthenticationProperties(user, properties);
                properties.ExpiresUtc = user.SessionTokens?.ExpirationTime;
                properties.IssuedUtc = user.SessionTokens?.IssuedTime;
            }
            await SignInAsync(user, properties, authenticationMethod);
        }