-1

I have my blockchain network setup up on the IBM blockchain starter plan using the starter kit (https://github.com/sstone1/blockchain-starter-kit)

I'm trying to setup up GitHub passport authentication on my ibmblockchain/composer-rest-server but I cant install the passport-github package on my composer-rest server.

If I ssh into my server I don't have the permission to use npm as I'm the composer user and I don't know where to find the password to change to the root user.

I tried to install the npm package by adding 'npm install -g passport-github' in the deploy_composer_rest_server in the pipeline-DEPLOY.sh file in https://github.com/sstone1/blockchain-starter-kit/blob/master/.bluemix/pipeline-DEPLOY.sh but it still didn't work.

If I look at the logs of my ibmblockchain/composer-rest-server I keep getting the error:

Cannot find module 'passport-github'

Has anyone found a way to get around this or know how to install the 'passport-github' package on the ibmblockchain/composer-rest-server?

Zoe
  • 27,060
  • 21
  • 118
  • 148
Simon Mullaney
  • 447
  • 2
  • 5
  • 21

1 Answers1

1

If you look at the Google OAuth tutorial in the composer documentation you will see a similar example of running a passport authentication strategy inside a composer-rest-server docker container. These are the specific lines used to build the new container and install the npm module:

FROM hyperledger/composer-rest-server
RUN npm install --production loopback-connector-mongodb passport-google-oauth2 && \
npm cache clean --force && \
ln -s node_modules .node_modules

If you have continuing problems, I would suggesting opening a ticket the IBM Cloud.

R Thatcher
  • 5,550
  • 1
  • 7
  • 15