ritterim / stuntman

Library for impersonating users during development leveraging ASP.NET Identity.
https://rimdev.io/stuntman/
MIT License
294 stars 35 forks source link

Set cookie domain for .AspNet.StuntmanAuthentication #177

Open n4ppy opened 6 years ago

n4ppy commented 6 years ago

Hi,

I have two mvc projects side by side and would like to use stuntman across both.

.AspNet.StuntmanAuthentication now has demo1.xyz.com as the domain on one site and demo2.xyz.com on the other site.

With app.UseCookieAuthentication(new CookieAuthenticationOptions { CookieDomain = ".xyz.com" } ) i can share the cookie for owin but is something similar possible with Stuntman?

Thanks.

kendaleiv commented 6 years ago

Specifying the cookie domain does not appear to be currently supported. Interested in submitting a pull request to add it?


At a glance it looks like here https://github.com/ritterim/stuntman/blob/fa0f2899900fa45d3caa7c4c9cf61c5c10e78c68/src/Core/IAppBuilderExtensions.cs#L36-L42 and https://github.com/ritterim/stuntman/blob/fa0f2899900fa45d3caa7c4c9cf61c5c10e78c68/src/Core/IServiceCollectionExtensions.cs#L39-L46 with an additional optional setting added to StuntmanOptions.

n4ppy commented 6 years ago

I'll have a go but in the middle of a release so may take a while :)