In your janrain.key file, it should be: [application]:[API key]
where [application] is the name of the application you registered with Janrain (i.e., the part that goes before rpxnow.com in the https://[your application].rpxnow.com URL). Anthony On Sunday, January 1, 2012 12:34:15 PM UTC-5, jc wrote: > > I am trying to get janrain login to work in test mode on my development > machine. The problem I have is that when I try to execute a controller > function for which I have set @auth.requires_login(), the system correctly > routes me to " > http://localhost:8000/list/default/user/login?_next=/list/default/func" > and displays login buttons. I click on a login button (google, yahoo etc) > and a window opens for me to sign in. I sign in, and now the system routes > me to url " > http://localhost:8000/list/default/user/login?token=bbed656a8bdef20ebc23fecf14d328b90ea6c481", > > and the login buttons are still displayed. I can now try to login as often > as I like, but I get no further. No entries have been created in the auth > tables. > > I am using web2py 1.99.4 on linux. I am following the instructions in > http://web2py.com/books/default/chapter/29/9#Integration-with-OpenID,-Facebook,-etc > . > > The steps I have taken are: > > - register for janrain > - in janrain settings enter localhost on the domain whitelist > - create janrain.key file containing 'localhost:xxxxxxxx...xxxx' where > xxxx etc is the API Key (Secret) supplied by janrain > - in web2py in a standard welcome app, or a wizard created app, or a 'New > simple application': > -- put the janrain.key file into .../web2py/applications/app/private > -- the standard welcome app includes (in db.py) > > from gluon.contrib.login_methods.rpx_account import use_janrain > > use_janrain(auth,filename='private/janrain.key') > > which, because of the code in gluon.contrib.login_methods.rpx_account > automatically does the "auth.settings.actions_disabled = ...." > and auth.settings.login_form = > RPXAccount(request, api_key='...', domain='...', url = " > http://localhost:8000/%s/default/user/login" %request.application) > stuff for me, once the janrain.key file exists. > -- add @auth.requires_login() just before a function, to force the sign-in > requirement. Usually I just do it to the index() function of the standard > default welcome app, for testing. > -- In the controller I have the standard user function i.e. def user(): > return dict(form=auth()) and the associated view exists. > > I can't see anything else I am supposed to do from chapter 8 of the book. > I fondly imagined that the auth() call in user() would handle getting > whatever data is sent from janrain, create entries in the auth tables etc. > > Thanks for any assistance. >

