1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Tried to fix auth. Still not working.

This commit is contained in:
Uncled1023 2016-02-02 16:38:57 -08:00
parent 58b4025f88
commit a363a4445d
2 changed files with 5 additions and 3 deletions

View File

@ -139,8 +139,8 @@ namespace Teknik.Areas.Profile.Controllers
}
HttpCookie authcookie = FormsAuthentication.GetAuthCookie(model.Username, model.RememberMe);
authcookie.Name = ".TeknikAuth";
authcookie.Domain = "." + Config.Host;
Response.Cookies.Add(authcookie);
authcookie.Domain = Config.Host;
Response.AppendCookie(authcookie);
if (string.IsNullOrEmpty(model.ReturnUrl))
{

View File

@ -18,7 +18,9 @@
</appSettings>
<system.web>
<customErrors mode="Off" />
<authentication mode="Forms" />
<authentication mode="Forms">
<forms domain=".teknik.io" loginUrl="~/Areas/Profile/Views/Profile/ViewLogin" path="*/*" timeout="2880" name=".TeknikAuth" />
</authentication>
<compilation debug="true" targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2" maxRequestLength="1048576" />
<pages buffer="true" enableViewState="false" />