Thank you for yor reply

my web2py version is: Version 2.12.3-stable+timestamp.2015.08.19.00.18.03

I am defining one extra field

auth.settings.extra_fields['auth_user'] = [Field('motp_secret', 'password', 
length=512, default='', label='MOTP Secret')]

What I am trying to do is implementing google authenticator which as I 
understand only needs a secret key (and not a secret pin like in the book 
example), that is why I am adding only one extra field

And finally thanks for your observation about lambdas, If I understand you 
I should leave it like this?:

auth.settings.two_factor_methods = [_set_two_factor(user, auth_two_factor)]
auth.settings.two_factor_onvalidation = [verify_otp(user, otp)]

Regards

El viernes, 15 de julio de 2016, 21:46:31 (UTC-5), Anthony escribió:
>
> Which version of web2py?
>
> Also, note that you must define extra fields before calling 
> auth.define_tables.
>
> And there is no reason to wrap your two callback functions in lamdas - 
> they already have the proper signature as is.
>
> Anthony
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to