authelia: actually remember me
This commit is contained in:
parent
e8271a99e4
commit
aa6df3dde3
3 changed files with 34 additions and 16 deletions
|
@ -10,9 +10,16 @@ let
|
||||||
in {
|
in {
|
||||||
services.authelia.instances.main = {
|
services.authelia.instances.main = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.authelia.overrideAttrs {
|
package = pkgs.authelia.override (p: {
|
||||||
patches = [ ./patches/remember-me-by-default.patch ];
|
web = let
|
||||||
};
|
orig_web = pkgs.callPackage "${pkgs.path}/pkgs/servers/authelia/web.nix" { inherit (p) nodejs pnpm fetchFromGitHub; };
|
||||||
|
in orig_web.overrideAttrs (old: {
|
||||||
|
postPatch = old.postPatch + ''
|
||||||
|
substituteInPlace src/views/LoginPortal/FirstFactor/FirstFactorForm.tsx \
|
||||||
|
--replace-fail "const [rememberMe, setRememberMe] = useState(false)" "const [rememberMe, setRememberMe] = useState(true)"
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
environmentVariables.AUTHELIA_AUTHENTICATION_BACKEND_LDAP_PASSWORD_FILE = config.age.secrets.lldap-bind-user-pass.path;
|
environmentVariables.AUTHELIA_AUTHENTICATION_BACKEND_LDAP_PASSWORD_FILE = config.age.secrets.lldap-bind-user-pass.path;
|
||||||
environmentVariables.AUTHELIA_NOTIFIER_SMTP_PASSWORD_FILE = config.age.secrets.authelia-smtp-password.path;
|
environmentVariables.AUTHELIA_NOTIFIER_SMTP_PASSWORD_FILE = config.age.secrets.authelia-smtp-password.path;
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/web/src/views/LoginPortal/FirstFactor/FirstFactorForm.tsx b/web/src/views/LoginPortal/FirstFactor/FirstFactorForm.tsx
|
|
||||||
index 6bbeda992..d08ade4c3 100644
|
|
||||||
--- a/web/src/views/LoginPortal/FirstFactor/FirstFactorForm.tsx
|
|
||||||
+++ b/web/src/views/LoginPortal/FirstFactor/FirstFactorForm.tsx
|
|
||||||
@@ -42,7 +42,7 @@ const FirstFactorForm = function (props: Props) {
|
|
||||||
|
|
||||||
const loginChannel = useMemo(() => new BroadcastChannel<boolean>("login"), []);
|
|
||||||
|
|
||||||
- const [rememberMe, setRememberMe] = useState(false);
|
|
||||||
+ const [rememberMe, setRememberMe] = useState(true);
|
|
||||||
const [username, setUsername] = useState("");
|
|
||||||
const [usernameError, setUsernameError] = useState(false);
|
|
||||||
const [password, setPassword] = useState("");
|
|
|
@ -18,6 +18,30 @@ in sources // {
|
||||||
# url = "https://github.com/NixOS/nixpkgs/pull/353360.patch";
|
# url = "https://github.com/NixOS/nixpkgs/pull/353360.patch";
|
||||||
# sha256 = "sha256-WPNnvVmtySyEk58kVIYWVx3VN8MhX4v2ITLLnUGhpz4=";
|
# sha256 = "sha256-WPNnvVmtySyEk58kVIYWVx3VN8MhX4v2ITLLnUGhpz4=";
|
||||||
# })
|
# })
|
||||||
|
(pkgs.writeText "authelia.patch" ''
|
||||||
|
diff --git a/pkgs/servers/authelia/default.nix b/pkgs/servers/authelia/default.nix
|
||||||
|
index 2c49c09b0550..35f0827f89d7 100644
|
||||||
|
--- a/pkgs/servers/authelia/default.nix
|
||||||
|
+++ b/pkgs/servers/authelia/default.nix
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
|
installShellFiles,
|
||||||
|
callPackage,
|
||||||
|
nixosTests,
|
||||||
|
+ web ? callPackage ./web.nix { inherit nodejs pnpm fetchFromGitHub; },
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
@@ -16,7 +17,7 @@ let
|
||||||
|
src
|
||||||
|
vendorHash
|
||||||
|
;
|
||||||
|
- web = callPackage ./web.nix { inherit nodejs pnpm fetchFromGitHub; };
|
||||||
|
+ # web = callPackage ./web.nix { inherit nodejs pnpm fetchFromGitHub; };
|
||||||
|
in
|
||||||
|
buildGoModule rec {
|
||||||
|
inherit
|
||||||
|
|
||||||
|
'')
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue