Node Create an API to validate Azure AD login

Asked

Viewed 67 times

0

Does anyone know how I could create an API to validate login with Azure AD and return a token?

  • Have you tried anything? post something so we can help you?

  • I had tried to use Passport-Azure with Passport ... but n had got the login part yet.

1 answer

1


First you must start your project, to help you with these route questions, you can use the Express Generator, then you can use the Passport-Azure

A Simple Example...

app.get('/login', 
  passport.authenticate('azuread-openidconnect', { failureRedirect: '/' }),
  function(req, res) {
    log.info('Login was called in the Sample');
    res.redirect('/');
});

Browser other questions tagged

You are not signed in. Login or sign up in order to post.