mirror of
https://github.com/mozilla/fxa.git
synced 2025-12-13 20:36:41 +01:00
28 lines
710 B
JavaScript
28 lines
710 B
JavaScript
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
const LocalVerifier = require('browserid-local-verify');
|
|
|
|
var verifier = new LocalVerifier();
|
|
|
|
process.on('message', function (message) {
|
|
if (!message.args) {
|
|
message.args = {};
|
|
}
|
|
try {
|
|
verifier.verify(message.args, function (err, res) {
|
|
if (err) {
|
|
return process.send({ err: err });
|
|
}
|
|
return process.send({ res: res });
|
|
});
|
|
} catch (err) {
|
|
return process.send({ err: err });
|
|
}
|
|
});
|
|
|
|
process.on('uncaughtException', function () {
|
|
process.exit(8);
|
|
});
|