bhathiya.m
bhathiya.m

Reputation: 215

How to generate authentication token after FormsAuthentication success in mvc 2

I'm developing MVC 2 web application. I'm using FormsAuthentication for sign in users to my application. I want to generate an authentication token after users are successfully login to the application. I have to pass that authentication token to another application. Are there any best ways to accomplish this task using MVC2(.net framework 4.0). Please help me to solve this problem.

Upvotes: 0

Views: 744

Answers (1)

Brian Mains
Brian Mains

Reputation: 50728

At best, FormsAuthentication has a GetAuthCookie method which gets the cookie details for a logged-in user. It's not really good for token-based authentication though. You can, however, share the forms auth cookies across web applications. There are restrictions involved, but here is some documentation (and this for ASP.NET Core) to help understand where to begin.

Upvotes: 1

Related Questions