I want to use passport-local to authenticate the user to enter the composerβs leisure server, like other passport strategies (e.g. passport-github , passport-google ).
So, first I try to set the COMPOSER_PROVIDER variable as follows
"local": { "provider": "local", "module": "passport-local", "usernameField": "username", "passwordField": "password", "authPath": "/auth/local", "successRedirect": "/", "failureRedirect": "/"}
Then I started the server in docker (with mongo as a constant data source) and added some user to the database collection
The question is: I need to use this passport. Because I run this command and still get a response with 401 Unauthorized
curl -H "Content-Type: application / json" -X POST -d {"Username": "{USER_NAME}", "password": "{user_password}"} " http: // localhost: 3000 / auth / local
Is this passport not enough? Do I need to start another service to authenticate this login locally (e.g. GitHub oAuth app)?
hyperledger-composer
Hiroe n
source share