I've been trying to implement authentication with AD from a REST API, and I decided to try out passport-azure-ad. I followed the article that this repo belongs to without success. I then downloaded this sample and tried to get it running. I wrote my own way of aquiring a token to test it, but everytime i try to call the protected routes I get a response like: {"code":"InternalError","message":"user is not defined"}
I've tried to look over most things based on node and passport, and I can't seem to find anything that adresses this. I've tried to debug with console.log, but nothing indicates what's going wrong.
Seem the placement of some of the results in the BearerStrategy was misplaced in the example code as well. Got it working after switching placement and defining user when user lookup had failed.
Hello,
I've been trying to implement authentication with AD from a REST API, and I decided to try out passport-azure-ad. I followed the article that this repo belongs to without success. I then downloaded this sample and tried to get it running. I wrote my own way of aquiring a token to test it, but everytime i try to call the protected routes I get a response like: {"code":"InternalError","message":"user is not defined"}
I've tried to look over most things based on node and passport, and I can't seem to find anything that adresses this. I've tried to debug with console.log, but nothing indicates what's going wrong.
Best regards,