Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# User Authentication with ASP.NET Identity Adding User Registration Reviewing User Registration

How does the Request.IsAuthenticated know whether the userName is still in the database

Is there any connection between the cookie middleware component and the identity components to check whether the cookie relates to an active user account in the context

1 Answer

Steven Parker
Steven Parker
231,269 Points

I believe that the database is only used during log on, and once a user has an authenticated session removing them from the membership database will have no effect on the current session.

To insure that removing a user also ends open sessions, a server reset should be performed at the same time.

But is the connection between identity components and the cookie creation components made implicitly or can we change it?

Steven Parker
Steven Parker
231,269 Points

I would expect both, but I cannot imagine any valid reason to change it.