If there is any stored value in ss-pid and session is timed out [Authenticate] attribute treats user as unauthenticated (expected).
When we try to authenticate the user again with value in ss-pid (cookie is populated when user clicks on remember me) through AuthenticateService,
response is always null. However if we clear the value of ss-pid, it’s working fine.
using (var authService = ResolveService<AuthenticateService>())
{
var response = authService.Authenticate(new Authenticate
{
provider = CredentialsAuthProvider.Name,
UserName = viewModel.UserName,
Password = viewModel.Password,
RememberMe = false
});
// add ASP.NET auth cookie
FormsAuthentication.SetAuthCookie(viewModel.UserName, false);
}
Any guidance is appreciated - Thanks!