Commit 4657487a authored by Thomas Lechauve's avatar Thomas Lechauve

Add prefix window before location

parent 2d0a62c0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
'use strict'; 'use strict';
$.vifib.login = { $.vifib.login = {
facebook: function (params) { facebook: function (params) {
var redirect = location.protocol + '//' + location.host + location.pathname + '#/dashboard/' + '?', var redirect = window.location.protocol + '//' + window.location.host + window.location.pathname + '#/dashboard/' + '?',
fburl = 'https://www.facebook.com/dialog/oauth?' + fburl = 'https://www.facebook.com/dialog/oauth?' +
'client_id=' + $(document).slapos('store', 'fbappid') + 'client_id=' + $(document).slapos('store', 'fbappid') +
'&redirect_uri=' + encodeURIComponent(redirect) + '&redirect_uri=' + encodeURIComponent(redirect) +
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
window.location.href = fburl; window.location.href = fburl;
}, },
google: function (params) { google: function (params) {
var redirect = location.protocol + '//' + location.host + location.pathname, var redirect = window.location.protocol + '//' + window.location.host + window.location.pathname,
ggurl = 'https://accounts.google.com/o/oauth2/auth?' + ggurl = 'https://accounts.google.com/o/oauth2/auth?' +
'client_id=' + $(document).slapos('store', 'ggappid') + 'client_id=' + $(document).slapos('store', 'ggappid') +
'&redirect_uri=' + encodeURIComponent(redirect) + '&redirect_uri=' + encodeURIComponent(redirect) +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment