|
@@ -22,9 +22,6 @@ function Strategy(options, verify) {
|
|
|
util.inherits(Strategy, passport.Strategy);
|
|
|
|
|
|
Strategy.prototype.authenticate = function(req, options) {
|
|
|
- console.log('ethereum authenticate...');
|
|
|
- console.log(req.body);
|
|
|
-
|
|
|
var message = req.body.message
|
|
|
, signature = req.body.signature;
|
|
|
|
|
@@ -39,13 +36,8 @@ Strategy.prototype.authenticate = function(req, options) {
|
|
|
return self.fail(info, 403);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
siweMessage.validate(signature)
|
|
|
.then(function(message) {
|
|
|
- console.log('valid!');
|
|
|
- console.log(message);
|
|
|
-
|
|
|
-
|
|
|
function verified(err, user, info) {
|
|
|
if (err) { return self.error(err); }
|
|
|
if (!user) { return self.fail(info); }
|