summaryrefslogtreecommitdiff
path: root/src/Auth.js
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2024-11-18 06:11:58 -0500
committerLLLL Colonq <llll@colonq>2024-11-18 06:11:58 -0500
commit8b635c5d44dc8841850a5bba21ded3bd443d22b9 (patch)
treeee86673bbbf7cab2409f89800b31cf5701f32836 /src/Auth.js
parent4a445edcb679345d6d730345a7d5cf39c8b70e6a (diff)
Check redirect
Diffstat (limited to 'src/Auth.js')
-rw-r--r--src/Auth.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Auth.js b/src/Auth.js
index 9d5060c..246052c 100644
--- a/src/Auth.js
+++ b/src/Auth.js
@@ -49,6 +49,8 @@ export const _clearSessionCookie = () => {
document.cookie = "authelia_session=; expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=None; Secure";
};
-export const getRedirect = (x) => {
- return x.redirect;
+export const _getRedirect = (Just) => (Nothing) => (x) => () => {
+ const r = x["data"]["redirect"];
+ if (r) return Just(r);
+ return Nothing;
};