summaryrefslogtreecommitdiff
path: root/addons/auth_oauth/static/src/js/auth_oauth.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/auth_oauth/static/src/js/auth_oauth.js')
-rw-r--r--addons/auth_oauth/static/src/js/auth_oauth.js17
1 files changed, 4 insertions, 13 deletions
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;
- }
- },
- });
-
};