In our MVC5-application with OWIN, we use additional to the local accounts also external logins (google). When the user logs in with its local account, he can activate the option to remember him, so he has not to log-in every time newly. When he logs in with his Google-account, he every time must click newly on the external login-button for google.
Is there a built-in option to activate the “remember me”-option also for external logins? Or is there a secure way to add this feature?
using the external sign-in method:
see Microsoft.AspNet.Identity.Owin.SignInManager::ExternalSignInAsync()
I usualy use "isPersist = true" in my web sites - most users expect to be logged in automatically when reentering a site requiring identification.
You just need to set IsPersistent to true to accomplish this when you sign in the user identity (you would want to also add some kind of remember me checkbox for the external flow probably as well)
To follow up on what Hao Kung suggested.
You will find the line of code in question in the accountController.cs file. The default function is:
To enable the remember me functionality with all external providers, change the line:
by changing the isPersistent varible to the constant true: