If you benefit from web2py hope you feel encouraged to pay it forward by contributing back to society in whatever form you choose!


  • 0
    cfhowes  14 years ago
    malagaonrails, It looks like my readme needs a little work. included is a custom auth class that adds 2 fields to the auth_user table (otherwise it's the same as the built-in auth). so in db.py you should add the following import:
    from applications..modules.customAuth import CustomAuth
    
    and, where you initialize auth for the first time, use the custom auth like so:
    auth=CustomAuth(globals(),T,db, True)  # authentication/authorization
    
    and then keep auth.define_tables() or use auth.define_tables(migrate=True) if you are not using auto migration you will have to update the database to add the two new fields. for postgres the SQL updates commands would be like:
    ALTER TABLE auth_user ADD COLUMN twitter_id var_char(128) UNIQUE;
    ALTER TABLE auth_user ADD COLUMN facebook_id var_char(128) UNIQUE; 
    
    this allows the code that links accounts together to work properly. good luck, christian

Commented on:

Authenticating with Facebook Connect, Twitter API, and/or Google accounts. Working on and off of Google App Engine (GAE)

Hosting graciously provided by:
Python Anywhere