Browse Source

did-get-redirect-request events removed

pull/2111/head
mxb 6 years ago
parent
commit
5941ba18ae
  1. 4
      app/ux/Auth0.js
  2. 2
      app/ux/WebView.js

4
app/ux/Auth0.js

@ -270,8 +270,8 @@ Ext.define('Rambox.ux.Auth0', {
authWindow.loadURL(me.authService.requestAuthCode());
authWindow.webContents.on('did-get-redirect-request', function(e, oldUrl, newUrl) {
me.authService.requestAccessCode(newUrl, me.onLogin.bind(me), authWindow);
authWindow.webContents.on('did-navigate', function(e, url) {
me.authService.requestAccessCode(url, me.onLogin.bind(me), authWindow);
});
}

2
app/ux/WebView.js

@ -514,7 +514,7 @@ Ext.define('Rambox.ux.WebView',{
});
}
webview.addEventListener('did-get-redirect-request', function( e ) {
webview.addEventListener('did-navigate', function( e ) {
if ( e.isMainFrame && me.record.get('type') === 'tweetdeck' ) Ext.defer(function() { webview.loadURL(e.newURL); }, 1000); // Applied a defer because sometimes is not redirecting. TweetDeck 2FA is an example.
});

Loading…
Cancel
Save