Set a more descriptive error on invalid credentials

This commit is contained in:
Saku Laesvuori 2023-11-01 19:53:54 +02:00
parent e5dc50195f
commit 4a78b6f7bf
Signed by: slaesvuo
GPG Key ID: 257D284A2A1D3A32
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ postLoginR authReq = do
FormSuccess auth -> do FormSuccess auth -> do
maybeAuth <- liftHandler $ authReq $ ("Basic " <> ) $ B64.encodeBase64 $ encodeUtf8 auth maybeAuth <- liftHandler $ authReq $ ("Basic " <> ) $ B64.encodeBase64 $ encodeUtf8 auth
case maybeAuth of case maybeAuth of
Nothing -> loginErrorMessageI LoginR Msg.NoIdentifierProvided -- invalid creds Nothing -> loginErrorMessageI LoginR Msg.InvalidEmailPass -- invalid creds
Just txt -> do Just txt -> do
setCredsRedirect Creds {credsPlugin = pluginName, credsIdent = txt, credsExtra = []} setCredsRedirect Creds {credsPlugin = pluginName, credsIdent = txt, credsExtra = []}
_ -> loginErrorMessageI LoginR Msg.NoIdentifierProvided _ -> loginErrorMessageI LoginR Msg.NoIdentifierProvided