diff --git a/browserid/lib/wsapi.js b/browserid/lib/wsapi.js index e0fa284b2b202bb7fdf48a14e72fb6002412dbc8..6585caff011001a66b6c00d4f860ea50579d969a 100644 --- a/browserid/lib/wsapi.js +++ b/browserid/lib/wsapi.js @@ -132,12 +132,11 @@ function setup(app) { var auth_status = false; function sendResponse() { - res.write(JSON.stringify({ + res.json({ csrf_token: req.session.csrf, server_time: (new Date()).getTime(), authenticated: auth_status - })); - res.end(); + }); }; // if they're authenticated for an email address that we don't know about,