Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed REST API Authentication with Express!
You have completed REST API Authentication with Express!
Instruction
Parse the Authorization Header
Writing a helper function to manually parse the user's credentials from the Authorization header can help you understand how Basic Authentication works. But in general, it's better not to write code that someone else has already written (and presumably tested) for you.
In this step, you'll use the basic-auth npm package to parse the user's credentials for you.
Use a Library to Parse the Autho...