Can you please open a ticket?

On Wednesday, 20 June 2012 07:02:28 UTC-5, Michele Comitini wrote:
>
> Alec,
>
> Thanks to you!
> You have found a bug either in the book or in the authentication code. 
>  web2py changed behavior.
> I have to check if a compatibility breach happened somewhere or if that 
> code was using some undocumented feature.
>
> mic
>
>
> Il giorno mercoledì 20 giugno 2012 02:33:36 UTC+2, Alec Taylor ha scritto:
>>
>> On Wed, Jun 20, 2012 at 7:49 AM, Michele Comitini 
>> <[email protected]> wrote: 
>> > You don't return a dictionary with the registration_id key in the 
>> > get_user() method. 
>> > 
>> > change the code as follows: 
>> > 
>> >  return dict(first_name = user['first_name'], last_name = 
>> > user['last_name'], username = user['id'], registration_id = 
>> > user['id']) 
>> > 
>> > This is stated in the web2py book as required parameter when using 
>> > third party authentication. 
>> > 
>> > mic 
>>
>> Thanks, that worked. 
>>
>> I guess I was reading the wrong book... I got the previous snippet 
>> from the "web2py Application Development Cookbook". 
>>
>> > 2012/6/16 Alec Taylor
>> >> Unfortunately I haven't been able to get Facebook login with OAuth2 
>> working. 
>> >> 
>> >> I've created a tiny test-case below with the problem. 
>> >> 
>> >> The only major changes I have made is to models/db.py with a minor 
>> >> function (foobar) in controllers/default.py. 
>> >> 
>> >> https://gist.github.com/9967cb95fe026890dae7 
>> >> 
>> >> I have placed the facebook.py file in the modules folder and the 
>> >> CLIENT_ID and CLIENT_SECRET in another .py file in my modules 
>> >> directory [file starts with `from gluon import *`]. 
>> >> 
>> >> Please tell me how I can get this to work. 
>> >> 
>> >> Thanks for all suggestions, 
>> >> 
>> >> Alec Taylor 
>> >> 
>> >> FYI: Not showing a ticket because it actually is stuck in an infinite 
>> >> loop. However when I take out the `@auth.requires_login()` decorator 
>> >> before the `foobar` function the page loads, but "Login" still appears 
>> >> in the top-right. 
>>
>

Reply via email to