mongoauth + skipEmailValidation

38 views
Skip to first unread message

alexmnyc

unread,
Oct 12, 2012, 6:31:20 PM10/12/12
to lif...@googlegroups.com
Does anyone know how to enable email validation using mongoauth module developed by Tim?

Thanks.

AGYNAMIX Torsten Uhlmann

unread,
Oct 13, 2012, 4:06:03 AM10/13/12
to lif...@googlegroups.com
I've looked a bit into it and this is what I think happens:

- the user class implements a flag "verified" which corresponds to the "validated" flag of MegaProtoUser
- There is a method in User "handleLoginToken" that is activated with a special token link (see below) and if the link is correct the user is verified and logged in
This method is currently used when an existing user forgot his password.

- When an existing user forgot his password the method "User.sendLoginToken" sends the token mail.

Now, there seems to be nothing in the module to send that mail after a user registers. To do that, I would suggest:

- Change the LoginToken to add some param that says this is only verification, like "&verify=true". You need that flag later in "handleLoginToken" to decide where to go after the token has been successfully applied. Right now it always goes to a page where you can change your password, you may want to go straight to the index page.

- Change the "RegisterScreen" finish method to send a verification email. Better yet I would think, add a method to the user that handles the creation of a user record with all the collected data and then asks a flag whether to send the verification email (a bit like MegaProtoUser). That way you can change the way users register and don't have to duplicate the behavior.

That's what I have learned so far from the module. 

I'd like @Tim to either correct or confirm it.

Hope that helps,
Torsten.

Am 13.10.2012 um 00:31 schrieb alexmnyc <a.mik...@gmail.com>:

Does anyone know how to enable email validation using mongoauth module developed by Tim?

Thanks.

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
 
 

alexmnyc

unread,
Oct 13, 2012, 2:36:41 PM10/13/12
to lif...@googlegroups.com
Thank you, Torsten!


Reply all
Reply to author
Forward
0 new messages