packages feed

yesod-auth 1.2.2.1 → 1.2.3

raw patch · 2 files changed

+13/−2 lines, 2 files

Files

Yesod/Auth/Email.hs view
@@ -172,6 +172,17 @@         setTitleI Msg.ConfirmationEmailSentTitle         [whamlet|<p>_{Msg.ConfirmationEmailSent identifier}|] +    -- | Additional normalization of email addresses, besides standard canonicalization.+    --+    -- Default: do nothing. Note that in future versions of Yesod, the default+    -- will change to lower casing the email address. At that point, you will+    -- need to either ensure your database values are migrated to lower case,+    -- or change this default back to doing nothing.+    --+    -- Since 1.2.3+    normalizeEmailAddress :: site -> Text -> Text+    normalizeEmailAddress _ = TS.toLower+ authEmail :: YesodAuthEmail m => AuthPlugin m authEmail =     AuthPlugin "email" dispatch $ \tm ->@@ -234,7 +245,7 @@                 loginErrorMessageI dest Msg.NoIdentifierProvided             Just x                 | Just x' <- Text.Email.Validate.canonicalizeEmail (encodeUtf8 x) ->-                    return $ decodeUtf8With lenientDecode x'+                    return $ normalizeEmailAddress y $ decodeUtf8With lenientDecode x'                 | allowUsername -> return $ TS.strip x                 | otherwise -> do                     loginErrorMessageI dest Msg.InvalidEmailAddress
yesod-auth.cabal view
@@ -1,5 +1,5 @@ name:            yesod-auth-version:         1.2.2.1+version:         1.2.3 license:         MIT license-file:    LICENSE author:          Michael Snoyman, Patrick Brisbin