From 4a454397f80dc535acb476016827a56842a782ad Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 16 Nov 2012 17:24:21 +0100 Subject: [IMP] auth_oauth: redirect directly to controller; do not make heuristic on arguments bzr revid: chs@openerp.com-20121116162421-5yahj18n88yykq2k --- addons/auth_oauth/static/src/js/auth_oauth.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'addons/auth_oauth/static/src') diff --git a/addons/auth_oauth/static/src/js/auth_oauth.js b/addons/auth_oauth/static/src/js/auth_oauth.js index 15683cfac2a..2aa66877d42 100644 --- a/addons/auth_oauth/static/src/js/auth_oauth.js +++ b/addons/auth_oauth/static/src/js/auth_oauth.js @@ -36,7 +36,10 @@ openerp.auth_oauth = function(instance) { ev.preventDefault(); var index = $(ev.target).data('index'); var p = this.oauth_providers[index]; - var ret = location.protocol+"//"+location.host+"/"; + var ret = _.str.sprintf('%s//%s/auth_oauth/signin', location.protocol, location.host); + if (instance.session.debug) { + ret += '?debug'; + } var dbname = self.$("form [name=db]").val(); var state_object = { d: dbname, @@ -55,16 +58,4 @@ openerp.auth_oauth = function(instance) { }, }); - instance.web.WebClient = instance.web.WebClient.extend({ - start: function() { - this._super.apply(this, arguments); - var params = $.deparam(window.location.hash.substring(1)); - // alert(JSON.stringify(params)); - if (params.hasOwnProperty('access_token')) { - var url = "/auth_oauth/signin" + '?' + $.param(params); - window.location = url; - } - }, - }); - }; -- cgit v1.2.3