Skip to content
This repository has been archived by the owner on Mar 23, 2022. It is now read-only.

Set cookie domain for .AspNet.StuntmanAuthentication #177

Open
n4ppy opened this issue Aug 15, 2018 · 2 comments
Open

Set cookie domain for .AspNet.StuntmanAuthentication #177

n4ppy opened this issue Aug 15, 2018 · 2 comments

Comments

@n4ppy
Copy link

n4ppy commented Aug 15, 2018

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
Copy link
Contributor

kendaleiv commented Aug 15, 2018

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

app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = Constants.StuntmanAuthenticationType,
LoginPath = new PathString(options.SignInUri),
LogoutPath = new PathString(options.SignOutUri),
ReturnUrlParameter = Constants.StuntmanOptions.ReturnUrlQueryStringKey,
});
and
authBuilder.AddCookie(
Constants.StuntmanAuthenticationType,
opts =>
{
opts.LoginPath = new PathString(options.SignInUri);
opts.LogoutPath = new PathString(options.SignOutUri);
opts.ReturnUrlParameter = Constants.StuntmanOptions.ReturnUrlQueryStringKey;
});
with an additional optional setting added to StuntmanOptions.

@n4ppy
Copy link
Author

n4ppy commented Aug 17, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants