diff --git a/app/assets/javascripts/discourse/initializers/auth-complete.js.es6 b/app/assets/javascripts/discourse/initializers/auth-complete.js.es6 index 613d03fd1..779067362 100644 --- a/app/assets/javascripts/discourse/initializers/auth-complete.js.es6 +++ b/app/assets/javascripts/discourse/initializers/auth-complete.js.es6 @@ -5,7 +5,12 @@ export default { if (window.location.search.indexOf('authComplete=true') !== -1) { const lastAuthResult = localStorage.getItem('lastAuthResult'); if (lastAuthResult) { - Discourse.authenticationComplete(JSON.parse(lastAuthResult)); + try { + Discourse.authenticationComplete(JSON.parse(lastAuthResult)); + } catch(e) { + document.write(`

lastAuthResult: ${lastAuthResult}

`); + document.write(e); + } } } }