Get passport-hd-auth as a package
This commit is contained in:
@@ -50,8 +50,9 @@ module.exports = function (options) {
|
||||
if(user) {
|
||||
// TODO: Support multiple login options...
|
||||
const loginMessage = {
|
||||
action: "authenticate",
|
||||
url: config.get("server.domain"),
|
||||
userIdentifier: user.displayName,
|
||||
domainUrl: "sigidli.com" // TODO: Replace with config value...
|
||||
}
|
||||
const challenge = hdAuthUtil.createChallenge(
|
||||
user.extendedPublicKeys[0].xpub,
|
||||
@@ -166,10 +167,11 @@ module.exports = function (options) {
|
||||
if (xpubUser) {
|
||||
// Challenge
|
||||
const registerationMessage = {
|
||||
action: "register",
|
||||
url: config.get("server.domain"),
|
||||
userIdentifier: xpubUser.displayName, // identifier the user supplies on the login page
|
||||
user: xpubUser,
|
||||
serviceExtendedPublicKey: config.get("bip32.serviceAuthenticatingExtendedPublicKey"),
|
||||
url: "sigidli.com"
|
||||
serviceExtendedPublicKey: config.get("bip32.serviceAuthenticatingExtendedPublicKey")
|
||||
}
|
||||
const challenge = hdAuthUtil.createChallenge(
|
||||
request.body.xpub, // update this to identifier...
|
||||
|
||||
@@ -13,7 +13,7 @@ module.exports = function () {
|
||||
const path = require("path");
|
||||
|
||||
const passport = require('passport');
|
||||
const HDAuthStrategy = require('../../passport-hd-auth').Strategy;
|
||||
const HDAuthStrategy = require('passport-hd-auth').Strategy;
|
||||
|
||||
const app = express();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user