I am trying to create an web-app with React in front-end and Node.js in back-end. I want my users authenticate to app with their Microsoft company accounts.
I trying to use this document from Microsoft but it make me confuse. as I understand here is the steps:
- user request to web-server to run the app
- browser download React SPA and using react-adal package, redirect user to Azure AD authentication URL which is https://login.microsoftonline.com
- after user successfully authenticate it send a token to client's browser
- I think next step is sending request to nodejs server with that token in header of request, is it correct?
Here is what I find in document:
The token is cached and the client attaches it to the request as the bearer token when making calls to its Web API back end, which is secured using the OWIN middleware.
but what is OWIN middleware and how can I use it in my nodejs app to make sure the token is valid and generated from Microsoft for that user?