Don't know if there is something already provided by the web2py Auth
class, but I think this could be accomplished with custom auth_user
fields (The book has examples for auth tables customization in 9.1.4)

One way would be to inspect the form returned by auth.login() and
search the user account related to the email specified to replace the
login email value with the default user's email before processing the
form.

Maybe you could use a list:string field type for storing extra email
accounts with unique value validator.

On registration, extra email fields could be configured as non
readable and shown only in the profile form

So the workflow could be:
Send a login standard form to the user
If a query for email fields in auth_user returns a user, change the
login value with the user's default email.
Continue login with auth.login_bare


On 21 ene, 14:12, thstart <thst...@gmail.com> wrote:
> I need to implement the following. Basically a SignIn with multiple
> verified email addresses.
>
>    1. A first time email/password SignUp.
>    2. Registered emails - send verification to the email account and
>    verified from the user after click. (this is done).
>    3. Each of the registered emails plus the initial SignUp email to be a
>    valid email address for email/password SignIn. The password - the same as
>    the initial Sign Up.
>
> e.g. the user SignUp with ema...@...com/password, then he
> registers/verifies two more emails: ema...@...com, email3...com. when he
> logs in next time he can login with:
>
> ema...@...com/password
> ema...@...com/password
> ema...@...com/password
>
> Security is OK because he is the owner of ema...@...com,
> ema...@...com and proves it by SignIn to these email accounts.
> ema...@...com is pending until he does the same as for other email
> addresses.
>
> How to accomplish this?

Reply via email to