I am currently implementing the authentication part of an API using Restify, Auth0, and Passport. Previously, everything was working okay already until I remembered that if a client authenticates against the API, the API should be able to redirect back to a URL that the client provides.
I cannot seem to find any documentation on how to do this in Passport and Auth0. Here is my current implementation of passport.authenticate
:
var passport = require(‘passport’);
var passportAuthenticate = passport.authenticate(“auth0”,{
responseType: ‘code’,
scope: ‘openid profile email’}
);
module.exports = {
get: passportAuthenticate
}
My goal is to be able to pass a client_id
, client_secret
, and redirect_uri
there so that at the /callback
, the API can retrieve those parameters and use them to validate the client and eventually redirect back to it.