express rest api key auth express rest api key auth express express

express rest api key auth


You can use passportjs for authentication middleware, and for using a token/key to authenticate you can use for example Bearer to add the token/key in the petition headers. You can fin here and example bearer.


You can use third party authentication providers to avoid taking username and password as input. Use Google, Facebook authentication using PassportJSHere is the link to Passport supporting third party authentication providers:

http://www.passportjs.org/packages/