From 2a47cbaba13f894b6e3419c72adb84eaf9afa319 Mon Sep 17 00:00:00 2001 From: Ramiro Saenz Date: Mon, 8 Oct 2018 12:45:51 -0300 Subject: [PATCH] Fixed backup and restore configuration --- app/ux/Auth0.js | 3 ++- app/ux/WebView.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/ux/Auth0.js b/app/ux/Auth0.js index 83016f90..d9790095 100644 --- a/app/ux/Auth0.js +++ b/app/ux/Auth0.js @@ -95,7 +95,7 @@ Ext.define('Rambox.ux.Auth0', { }); 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' ,headers: { authorization: "Bearer " + localStorage.getItem('id_token') } ,jsonData: { user_metadata: { services: services, services_lastupdate: lastupdate } } @@ -279,6 +279,7 @@ Ext.define('Rambox.ux.Auth0', { localStorage.removeItem('profile'); localStorage.removeItem('id_token'); localStorage.removeItem('refresh_token'); + localStorage.removeItem('access_token'); // Set cookies to help Tooltip.io messages segmentation Ext.util.Cookies.set('auth0', false); diff --git a/app/ux/WebView.js b/app/ux/WebView.js index daaffce9..524ad3fd 100644 --- a/app/ux/WebView.js +++ b/app/ux/WebView.js @@ -170,7 +170,7 @@ Ext.define('Rambox.ux.WebView',{ tag: 'webview' ,src: me.record.get('url') ,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' ,allowtransparency: 'on' ,autosize: 'on'