alfonsodg / demo-web2py

Apache License 2.0
0 stars 0 forks source link

auth.login(onaccept=execute_me_after_login) doesn't work for oauth20 and oauth10_a #194

Closed alfonsodg closed 10 years ago

alfonsodg commented 10 years ago

From firedrag...@gmail.com on February 18, 2011 02:53:28

What steps will reproduce the problem? 1. define a function called execute_me_after_login: def execute_me_after_login(form): print 'Execute me please!'

  1. define the login function in default.py: def login(): from gluon.contrib.login_methods.auth20_account.py import OAuthAccount (or auth10a_account.py) auth.settings.login_form=OAuthAccount(globals()) return dict(auth.login(onaccept=execute_me_after_login)) What is the expected output? What do you see instead? There is no output from execute_me_after_login() meaning the function is not executed. execute_me_after_login() is executed when using the regular form authentication. To be consistent, onaccept should work for other login methods. What version of the product are you using? On what operating system? 1.86.2, Linux Please provide any additional information below. None.

Original issue: http://code.google.com/p/web2py/issues/detail?id=196

alfonsodg commented 10 years ago

From massimo....@gmail.com on June 25, 2011 10:13:03

When using an external login there is no form, therefore the onaccept function should take no arguments.

Status: Invalid