Possibly a silly question, I am trying to work through an example for OAuth
and want to understand exactly what is happening before I add to my own code.
Sample is node
, express
using passport-azure-ad
The route is being defined and a call to passport.authenticate
is made.
app.get('/login',
(req, res, next) => {
passport.authenticate('azuread-openidconnect',
{
response: res,
resourceURL: config.resourceURL,
failureRedirect: '/'
})(req, res, next); // <-- Here is what I am stuck on.
},
(req, res) => {
log.info('Login was called in the Sample');
res.redirect('/');
});
I am trying to understand the (req, res, next);
that follows directly after the authenticate.
Appreciate any help, or a link to the theory/documentation on this syntax.