Yes, I even created a custom table by copying the exact auth_user table from Auth.define_tables, and it still generated the redirect loop, so it doesn't appear to have anything to do with the particular fields or definition of the auth_user table -- just the fact that it is defined outside of define_tables(). It wasn't clear what was causing the loop in that case.
Anthony On Friday, August 26, 2011 12:22:20 AM UTC-4, rochacbruno wrote: > > I ran in the same problem, I figured out that using custom auth tables in > provider app make the client app to run in infinite loop. I also tried to > include 'username' field to the custom Auth table but did not solve the > problem. > > My custom Auth Table > > https://gist.github.com/1172687 ( I tried with username = True, but did > not works) > > *then in the client app i have* > > auth = Auth(db,hmac_key=Auth.get_or_create_key(),cas_provider=' > http://0.0.0.0:8000/tutor/default/user/cas') > from gluon.contrib.login_methods.cas_auth import CasAuth > auth.settings.login_form=CasAuth(globals(), urlbase = " > http://0.0.0.0:8000/tutor/default/user/cas", actions=['login', 'validate', > 'logout']) > > I got this as url: > > http://0.0.0.0:8000/tutor/default/user/cas/login?service=http://0.0.0.0:8000/client/default/user/login > > and the browser error: > > This webpage has a redirect loop > The webpage at * > http://0.0.0.0:8000/tutor/default/user/cas/login?service=http://0.0.0.0:8000/client/default/user/login > * has resulted in too many redirects. Clearing your cookies for this site > or allowing third-party cookies may fix the problem. If not, it is possibly > a server configuration issue and not a problem with your computer. > It is strange because I already use CAS in another apps, but this apps has > default auth table and runs very well, I also created an adapter to bring > groups and permissions from provider to client and stores in a kind of > cache. > The problem seems to be when using custom auth tables. > Any clue? > >

