Authentication failures indicate what went wrong during authentication.
They may provide useful information to the developer, although it is
generally not advisable to show the user the exact details about why login
failed.

Other Utilities

Function to get auth settings from a config file. This function can be
used by the authors of auth snaplet backends in the initializer to let the
user configure the auth snaplet from a config file. All options are
optional and default to what's in defAuthSettings if not supplied.
Here's what the default options would look like in the config file:

This uses an existential type so that the backend type doesn't
escape AuthManager. The reason that the type is Handler b
(AuthManager v) a and not a is because anything that uses the
backend will return an IO something, which you can liftIO, or a
Handler b (AuthManager v) a if it uses other handler things.

To make your users stay logged in for longer than the session replay
prevention timeout, you must pass a field name as the third parameter and
that field must be set to a value of "1" by the submitting form. This
lets you use a user selectable check box. Or if you want user remembering
always turned on, you can use a hidden form field.

This function generates a random password reset token and stores it in
the database for the user. Call this function when a user forgets their
password. Then use the token to autogenerate a link that the user can
visit to reset their password. This function also sets a timestamp so the
reset token can be expired.