Commit b9dee713 authored by Thomas Lechauve's avatar Thomas Lechauve

(Firefox) Fix redirect_uri format for auth request

parent 267dfdb0
$.vifib.login = { $.vifib.login = {
facebook: function (params) { facebook: function (params) {
var redirect = window.location.origin + window.location.pathname + '#/dashboard/' + '?', var redirect = location.protocol + '//' + location.host + 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) +
...@@ -11,7 +11,7 @@ $.vifib.login = { ...@@ -11,7 +11,7 @@ $.vifib.login = {
window.location.href = fburl; window.location.href = fburl;
}, },
google: function (params) { google: function (params) {
var redirect = window.location.origin + window.location.pathname + '?', var redirect = location.protocol + '//' + location.host + 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