Why call SignOut(DefaultAuthenticationTypes.ExternalCookie) before use of ApplicationCookie with ASP.Net Identity?

后端 未结 1 1012
梦谈多话
梦谈多话 2021-01-05 12:53

Why does this example call the SignOut for ExternalCookie before signing in with an ApplicationCookie? Is it just a way to make sure the authentication information is clean?

相关标签:
1条回答
  • 2021-01-05 13:38

    Its basically cleanup, the external cookie should get cleared eventually, its only needed to store the claims returned from google/fb/twitter etc such that app can pull whatever data it needs before signing the user. So SignIn is a good safe place to clear that external data.

    0 讨论(0)
提交回复
热议问题