I'd like to offer users two methods of creating accounts because I have two "types" of users.
One type will login using their LinkedIn account from which I will take their profile information and perform LinkedIn API calls (such as Search). The 2nd type will register their name, email and chosen password. This page talks a little about Multiple login forms: http://web2py.com/books/default/chapter/29/9#Customizing-Auth (I've pasted in the relevant section below). Q: How do I handle the setting of the equivalent "auth.settings.actions_disabled" for my 2nd authentication method? ie I won't have a registration form or options to reset password or request a password reset for LinkedIn users. >From The Book... Multiple login forms Some login methods modify the login_form, some do not. When they do that, they may not be able to coexist. Yet some coexist by providing multiple login forms in the same page. web2py provides a way to do it. Here is an example mixing normal login (auth) and RPX login (janrain.com): 1. 2. 3. 4. from gluon.contrib.login_methods.extended_login_form import ExtendedLoginForm other_form = RPXAccount(request, api_key='...', domain='...', url='...') auth.settings.login_form = ExtendedLoginForm(request, auth, other_form, signals=['token']) If signals are set and a parameter in request matches any signals, it will return the call ofother_form.login_form instead. other_form can handle some particular situations, for example, multiple steps of OpenID login inside other_form.login_form. Otherwise it will render the normal login form together with the other_form --
