Browse Source

Fixed backup and restore configuration

pull/1922/head
Ramiro Saenz 7 years ago
parent
commit
2a47cbaba1
  1. 3
      app/ux/Auth0.js
  2. 2
      app/ux/WebView.js

3
app/ux/Auth0.js

@ -95,7 +95,7 @@ Ext.define('Rambox.ux.Auth0', {
}); });
Ext.Ajax.request({ Ext.Ajax.request({
url: 'https://rambox.auth0.com/api/v2/users/'+Ext.decode(localStorage.getItem('profile')).user_id url: 'https://rambox.auth0.com/api/v2/users/'+Ext.decode(localStorage.getItem('profile')).sub
,method: 'PATCH' ,method: 'PATCH'
,headers: { authorization: "Bearer " + localStorage.getItem('id_token') } ,headers: { authorization: "Bearer " + localStorage.getItem('id_token') }
,jsonData: { user_metadata: { services: services, services_lastupdate: lastupdate } } ,jsonData: { user_metadata: { services: services, services_lastupdate: lastupdate } }
@ -279,6 +279,7 @@ Ext.define('Rambox.ux.Auth0', {
localStorage.removeItem('profile'); localStorage.removeItem('profile');
localStorage.removeItem('id_token'); localStorage.removeItem('id_token');
localStorage.removeItem('refresh_token'); localStorage.removeItem('refresh_token');
localStorage.removeItem('access_token');
// Set cookies to help Tooltip.io messages segmentation // Set cookies to help Tooltip.io messages segmentation
Ext.util.Cookies.set('auth0', false); Ext.util.Cookies.set('auth0', false);

2
app/ux/WebView.js

@ -170,7 +170,7 @@ Ext.define('Rambox.ux.WebView',{
tag: 'webview' tag: 'webview'
,src: me.record.get('url') ,src: me.record.get('url')
,style: 'width:100%;height:100%;visibility:visible;' ,style: 'width:100%;height:100%;visibility:visible;'
,partition: 'persist:' + me.record.get('type') + '_' + me.id.replace('tab_', '') + (localStorage.getItem('id_token') ? '_' + Ext.decode(localStorage.getItem('profile')).user_id : '') ,partition: 'persist:' + me.record.get('type') + '_' + me.id.replace('tab_', '') + (localStorage.getItem('id_token') ? '_' + Ext.decode(localStorage.getItem('profile')).sub : '')
,plugins: 'true' ,plugins: 'true'
,allowtransparency: 'on' ,allowtransparency: 'on'
,autosize: 'on' ,autosize: 'on'

Loading…
Cancel
Save