From 4a78b6f7bfc2c5a09fce0b44158db42e4698c860 Mon Sep 17 00:00:00 2001 From: Saku Laesvuori Date: Wed, 1 Nov 2023 19:53:54 +0200 Subject: [PATCH] Set a more descriptive error on invalid credentials --- frontend/src/Datarekisteri/Frontend/Auth.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Datarekisteri/Frontend/Auth.hs b/frontend/src/Datarekisteri/Frontend/Auth.hs index 75f2144..b187f83 100644 --- a/frontend/src/Datarekisteri/Frontend/Auth.hs +++ b/frontend/src/Datarekisteri/Frontend/Auth.hs @@ -37,7 +37,7 @@ postLoginR authReq = do FormSuccess auth -> do maybeAuth <- liftHandler $ authReq $ ("Basic " <> ) $ B64.encodeBase64 $ encodeUtf8 auth case maybeAuth of - Nothing -> loginErrorMessageI LoginR Msg.NoIdentifierProvided -- invalid creds + Nothing -> loginErrorMessageI LoginR Msg.InvalidEmailPass -- invalid creds Just txt -> do setCredsRedirect Creds {credsPlugin = pluginName, credsIdent = txt, credsExtra = []} _ -> loginErrorMessageI LoginR Msg.NoIdentifierProvided