summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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