简体   繁体   English

ASP.NET Core身份:是否希望保留应用程序cookie?

[英]ASP.NET Core Identity: intended that application cookie remains?

I created a web application with individual user accounts from the VS 2017 template. 我使用VS 2017模板中的单个用户帐户创建了一个Web应用程序。 I scaffolded the Identity part to see what's done and inspect how everything is working. 我搭建了身份部分,以查看已完成的工作并检查所有工作方式。

One thing that raised my attention was the application cookie created after login. 引起我注意的一件事是登录后创建的应用程序cookie。

Since the login creates it I expected it to be deleted on logout. 由于登录是创建的,因此我希望在注销时将其删除。 But it remains after logout. 但注销后仍然保留。 Since I am quite green on cookie authentication my question is if it is inteded that the cookie remains or should it be deleted? 由于我对Cookie身份验证非常满意,因此我的问题是,是否确实保留了Cookie还是应该将其删除? If yes, how I would get it removed? 如果是,我将如何删除它?

Since it isn't removed how does Identity differentiate if the user is logged in or not (if not based on the cookie)? 由于未删除,如果用户未登录(如果不是基于cookie,则Identity)如何区分?

For me it seems this is an Firefox issue not updating the developer information correctly. 对我来说,这似乎是Firefox问题,无法正确更新开发者信息。

When I close the developer info (F12) and reopen the cookie is gone.... 当我关闭开发人员信息(F12)并重新打开时,cookie消失了。

Chrome displays the disappearance of the cookie immediatly. Chrome会立即显示Cookie的消失。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM