blowdart / idunno.CookieSharing

Project demonstrating how to share authentication cookies between ASP.NET 4.5 and ASP.NET Core applications.
77 stars 27 forks source link

Sharing Cookie between Aspnet core and legacy .NET app using Cookie Middleware #8

Open aagarwal10 opened 7 years ago

aagarwal10 commented 7 years ago

I am trying to share cookie between Aspnet Core App (using 4.6.1 framework) and Aspnet WebForms (using 4.6.1 framework) using above documentation. I am using Redis implementation of ITicketStore for Aspnet Core Cookie Middleware and have Redis implementation of IAuthenticationSessionStore for Webforms CookieMiddleware. Now my question, is it possible to share cookie between my two .NET apps using Redis as Session Store since both use different version of AuthenticationTicket serialized into same instance of Redis for sharing session??

AuthenticationTicket used in Core App is from Microsoft.AspNetCore.Authentication AuthenticationTicket used in Webforms App is from Microsoft.Owin.Security

I hope my problem statement is clear.

Please advise here.

blowdart commented 7 years ago

I have no idea without trying it. The goal of the compat layer was only to concentrate on auth cookies with serialized claims, and not for cookies which point elsewhere.