Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using "Remember Me" functionality for authentication in .NET 2.0

My client wants me to enable a "Remember Me" checkbox when the user logs in. I am encrypting and storing both the username and password in a cookie.

However, you cannot write to a textbox when it's in password mode.

I've seen this done numerous times, so how are they doing it?

thanks in advance!

like image 725
ManiacPsycho Avatar asked Sep 29 '08 19:09

ManiacPsycho


People also ask

How do I use authentication in .NET core?

For example, when using ASP.NET Core Identity, AddAuthentication is called internally. The Authentication middleware is added in Startup. Configure by calling UseAuthentication. Calling UseAuthentication registers the middleware that uses the previously registered authentication schemes.

How does .NET authorization work?

Authorization refers to the process that determines what a user is able to do. For example, an administrative user is allowed to create a document library, add documents, edit documents, and delete them. A non-administrative user working with the library is only authorized to read the documents.

How does authorize attribute work C# .NET Core?

The Authorize attribute enables you to restrict access to resources based on roles. It is a declarative attribute that can be applied to a controller or an action method. If you specify this attribute without any arguments, it only checks if the user is authenticated.


1 Answers

How about instead of inserting the text into the login form, you just bypass the form completely and check the contents of the cookie right at the login page? Less work for the user, and it'll make it a little more seamless.

like image 199
Alex Fort Avatar answered Sep 24 '22 04:09

Alex Fort