summaryrefslogtreecommitdiff
path: root/fig-web
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2024-11-14 21:59:22 -0500
committerLLLL Colonq <llll@colonq>2024-11-14 21:59:22 -0500
commit4a45e3dc3f5b6d9bf0f9e101d1f807c0ea42ac1f (patch)
tree26c14029f3b0a50a56e2db9d53e6ddcc811ae109 /fig-web
parent2975b7e20a35ecaff0619af133068238021a8c5b (diff)
Logging changes
Diffstat (limited to 'fig-web')
-rw-r--r--fig-web/src/Fig/Web.hs1
-rw-r--r--fig-web/src/Fig/Web/Auth.hs3
2 files changed, 1 insertions, 3 deletions
diff --git a/fig-web/src/Fig/Web.hs b/fig-web/src/Fig/Web.hs
index 37a1991..4c0e0ed 100644
--- a/fig-web/src/Fig/Web.hs
+++ b/fig-web/src/Fig/Web.hs
@@ -93,6 +93,7 @@ app cfg cmds liveEvents currentlyLive = do
, " curl https://secure.colonq.computer --cookie cookies.txt\n"
]
Sc.get "/api/register" $ authed cfg \auth -> do
+ log "Authenticated with Twitch, trying to register..."
let user = Text.toLower auth.name
LDAP.resetUserPassword cfg user auth.id >>= \case
Nothing -> do
diff --git a/fig-web/src/Fig/Web/Auth.hs b/fig-web/src/Fig/Web/Auth.hs
index 2fb23b9..b78e3b3 100644
--- a/fig-web/src/Fig/Web/Auth.hs
+++ b/fig-web/src/Fig/Web/Auth.hs
@@ -67,14 +67,11 @@ checkAuth cfg =
_other -> Nothing
case (Map.lookup "token" pairs, Map.lookup "nonce" pairs) of
(Just token, Just nonce) -> do
- log $ tshow token
- log $ tshow nonce
validateToken (encodeUtf8 token) >>= \case
Just tc
| tc.aud == cfg.clientId
, tc.nonce == nonce
-> do
- log $ tshow tc
pure . Just $ Auth
{ name = tc.preferred_username
, id = tc.sub