i've managed to create a branch on launchpad, so when interested: https://code.launchpad.net/~hans-d/web2py/dev-gae-auth
On May 21, 3:37 pm, HansD <[email protected]> wrote: > understood, but for trying to run it out-of-the-box using username it > will fail, that's why. > > anyway, I've created a quick patch that allows for using google > accounts authentication when running on gae. (will mail it to you) > > using the patched version of Auth, it allows for: > > from gluon.settings import settings > if settings.web2py_runtime_gae: > from gluon.contrib.authentication.gae_google_account import * > auth.settings.login_form = GaeGoogleAccount() > > It's a variant on the alternative login methods, in this case > replacing the web2py login form with the google account login form. > > On May 21, 2:41 pm, mdipierro <[email protected]> wrote: > > > > > > > You can customize tables. If your "auth_user" table has a field > > 'username' that's used for login. By default, there is no "username" > > and it uses "email". That is why I used "email" in m example. > > > Massimo > > > On May 21, 6:31 am, HansD <[email protected]> wrote: > > > > the user table only contains email and not username. providing > > > 'username' as a key will crash it as the database currently has no > > > username field. > > > > On May 21, 10:01 am, HansD <[email protected]> wrote: > > > > > def get_or_create_user(self, keys): > > > > if 'username' in keys: > > > > username = 'username' > > > > elif 'email' in keys: > > > > username = 'email' > > > > else: > > > > raise SyntaxError, "user must have username of email" > > > > > should the message not be "user must have username or email" (or vs > > > > of)? > > > > > On May 21, 9:39 am, HansD <[email protected]> wrote: > > > > > > in gluon.tools, under Auth.__init__ i found the following piece of > > > > > code: > > > > > > if not request.vars._next: > > > > > request.vars._next = request.env.http_referer or '' > > > > > if next == DEFAULT: > > > > > next = request.vars._next or self.settings.login_next > > > > > > next will thus allways be request.vars._next (when initially DEFAULT) > > > > > due to the 2 lines above it. > > > > > Should they be switched, or .. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

