From 99b37beaa4ea6770bf39270375aca8e9d57816c1 Mon Sep 17 00:00:00 2001 From: nek0 Date: Fri, 5 Sep 2014 20:40:47 +0200 Subject: [PATCH] delete tokens --- Handler/Login.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Handler/Login.hs b/Handler/Login.hs index 85b52a5..961151d 100644 --- a/Handler/Login.hs +++ b/Handler/Login.hs @@ -53,8 +53,9 @@ postLoginR = do hexSalted <- return $ toHex salted expected <- return $ hmacSHA1 (tokenToken token) (encodeUtf8 hexSalted) case (fromHex' $ T.unpack hexResponse) == expected of - True -> + True -> do -- Success!! + runDB $ delete tokenId return $ Right savedUserId _ -> return $ Left ("Wrong password" :: T.Text)