fixed cookie domains

This commit is contained in:
Rudis Muiznieks 2023-04-30 18:17:31 -05:00
parent 4af6da6758
commit d23b74cfb8
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
1 changed files with 2 additions and 3 deletions

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Text.Json;
using Fido2NetLib;
using Fido2NetLib.Objects;
using Microsoft.AspNetCore.Diagnostics;
using Microsoft.Data.Sqlite;
using SQLitePCL;
@ -93,7 +92,7 @@ public static class Program {
SameSite = SameSiteMode.None,
MaxAge = TimeSpan.FromSeconds(s_lifetime),
};
if (string.IsNullOrEmpty(s_domain)) {
if (!string.IsNullOrEmpty(s_domain)) {
cookieOpts.Domain = s_domain;
}
@ -158,7 +157,7 @@ public static class Program {
SameSite = SameSiteMode.None,
MaxAge = TimeSpan.FromSeconds(s_lifetime),
};
if (string.IsNullOrEmpty(s_domain)) {
if (!string.IsNullOrEmpty(s_domain)) {
cookieOpts.Domain = s_domain;
}