summaryrefslogtreecommitdiff
path: root/addons/auth_oauth/static/src/js/auth_oauth.js
diff options
context:
space:
mode:
authorvta vta@openerp.com <>2012-08-13 14:33:33 +0200
committervta vta@openerp.com <>2012-08-13 14:33:33 +0200
commit7c3a72300cd0cfd53e14eb3e1134d6ccaac72af9 (patch)
tree311716b6d55f95a212253fb336d8045f24260390 /addons/auth_oauth/static/src/js/auth_oauth.js
parentd946d35ee0590829b16b4403145a2b25b52be251 (diff)
[FIX] Fixed login to OpenERP with Google OAuth2. Still fails when redirecting an authenticated user.
bzr revid: vta@openerp.com-20120813123333-b4jwsrn106lakbnh
Diffstat (limited to 'addons/auth_oauth/static/src/js/auth_oauth.js')
-rw-r--r--addons/auth_oauth/static/src/js/auth_oauth.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/addons/auth_oauth/static/src/js/auth_oauth.js b/addons/auth_oauth/static/src/js/auth_oauth.js
index 057865cab4e..fb896923d03 100644
--- a/addons/auth_oauth/static/src/js/auth_oauth.js
+++ b/addons/auth_oauth/static/src/js/auth_oauth.js
@@ -13,7 +13,7 @@ openerp.auth_oauth = function(instance) {
response_type: 'token',
client_id: '108010644258-duuhmp6pu7li4tsmnqg7j9rvdeklg0ki.apps.googleusercontent.com',
redirect_uri: 'https://localhost/',
- scope: 'https://www.googleapis.com/auth/userinfo.email',
+ scope: 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile',
state: state,
};
var url = endpoint + '?' + $.param(params);
@@ -29,12 +29,9 @@ 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);
+ var params = $.deparam(window.location.hash.substring(1));
if (params.hasOwnProperty('access_token')) {
- // fix params for python marshmalling
- params.state = params["#state"]
- delete params["#state"]
- var url = "/auth_oauth/signin" + '?' + $.param(params);
+ var url = "/auth_oauth/signin" + '?' + $.param(params);//alert(JSON.stringify(params));
window.location = url;
}
},