Re: [web2py] how to change facebook oauth2 redirect_uri

2016-04-11 Thread killzane
Hi I have tried your suggestion and put the code auth.settings.login_url = URL(c='default', f='fbLogin', args=['login']) this is in my default.py def fbLogin(): auth.settings.login_form=FaceBookAccount() auth.settings.login_url = URL(c='default', f='fbLogin', args=['login']) form = auth()

Re: [web2py] how to change facebook oauth2 redirect_uri

2016-04-11 Thread Michele Comitini
In the standard web2py authentication is triggered by @auth.requires_login decorator if the user is not authenticated already. in model after defining a class FacebookAccount() extended from gluon.contrib.oauth20_account.OAuthAccount auth.settings.login_form = FacebookAccount() # change

Re: [web2py] how to change facebook oauth2 redirect_uri

2016-04-10 Thread killzane
I see all settings but I don't know what attribute I should change. the *redirect_uri* args I mean is when log with facebook will goto https://www.facebook.com/dialog/oauth? client_id=568390199919780& scope=email,user_birthday& *redirect_uri*=https://my_domain/[app]/default/user/login because

Re: [web2py] how to change facebook oauth2 redirect_uri

2016-04-10 Thread Michele Comitini
You should be able to change redirect url using the standard settings of auth. http://www.web2py.com/books/default/chapter/29/09/access-control#Auth-Settings-and-messages You do not need ajax, just a window.open() or a or an iframe 2016-04-10 9:38 GMT+02:00 killzane : >

[web2py] how to change facebook oauth2 redirect_uri

2016-04-10 Thread killzane
I followed the web2py book http://web2py.com/books/default/chapter/29/09/access-control#Other-login-methods-and-login-forms and put the example code in my model and I use this in my controllers named *default.py* def fbLogin(): auth.settings.login_form=FaceBookAccount() form = auth() return