From 33a418d5370f1d459b3a47df42573f366fd95830 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 10 Jun 2016 12:05:14 -0400 Subject: [PATCH] Log errors authenticating with facebook --- .../discourse/initializers/auth-complete.js.es6 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); + } } } }