How to use .js passport and OpenID Connect with Azure AD

I am looking for user authentication using OpenID Connect, Node.js, Passport.js vs Azure AD. Could you tell me any resources / documents and / or sample code?

I came across passport-openidconnect . Is this still an active module? do you know of any other module that i could use for this? If so, if you could give me some sample code that would be great!

+6
source share
2 answers

There is a special passport module for Azure AD called passport-azure-ad

Configuration steps:

  • Register your application (in Azure AD)
  • Install all the required npm packages.
  • Configure the application to use the passport-azure ad.

    3.a Setting passport strategy

    3.b Add methods to track registered users

    3.c Initialize the passport when loading the express engine

    3.d Add routes that will handle login / logff

  • Use passport to issue sign-in and sign-out requests in Azure AD

Check out the white papers (including the sample) for the code for each of the following steps: https://azure.microsoft.com/en-us/documentation/articles/active-directory-devquickstarts-openidconnect-nodejs/

+1
source

The answer to your question is yes. There are several node.js modules that you can use to implement authentication through AAD.

Any further worries, please feel free to let me know.

0
source

Source: https://habr.com/ru/post/985181/


All Articles