happstack-authenticate 2 account creation

Skip to first unread message

Corentin Dupont

Aug 3, 2015, 10:47:10 AM8/3/15
to Jeremy Shaw, ha...@googlegroups.com
another question: how to parameter the account creation?
For example now it accepts a name with only a space and no emails. How can I change that?

On Mon, Aug 3, 2015 at 1:02 PM, Corentin Dupont <corenti...@gmail.com> wrote:

I'm a bit confused about the routeAuthenticate and authenticateState bits in the new happstack-authenticate.

It seems that I have to do this in the beginning of my application:

(_, routeAuthenticate, authenticateState) <-
      liftIO $ initAuthentication Nothing (const $ return True)
        [ initPassword "http://localhost:8000/#resetPassword" "example.org"
        , initOpenId]

Where this should be done? In the main? If possible I'd prefer to delay it because my main is web-agnotic.
Where should I store those two values? Should I put them in my monad stack (I have a StateT)?
Is the routeAuthenticate really necessary? It looks a bit cumbersome to carry it around everywhere in the states.


Jeremy Shaw

Aug 4, 2015, 12:09:10 AM8/4/15
to HAppS, Jeremy Shaw

The current code does not enforce any sort of sensible restrictions on username/password/email, etc, no does it provide hooks to allow you to. But it would be swell if it did!

That information would be passed in via the initPassword function:


Right now there is a paramater, isAuthAdmin. I am thinking that would be replace with a record that includes isAuthAdmin, plus some functions that can place restrictions on the username and password?

- jeremy
> --
> You received this message because you are subscribed to the Google Groups "HAppS" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to happs+un...@googlegroups.com.
> To post to this group, send email to ha...@googlegroups.com.
> Visit this group at http://groups.google.com/group/happs.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
0 new messages