OpenIDConnect
OpenIDConnect copied to clipboard
Fix: respect router's baseUrl when redirecting to login_url
This PR fixes the return_url when using the OpenIDConnect middleware from a router under a sub-path. For example,
const OauthRoutes = require('./routes/oauth')
app.use('/oauth', OauthRoutes)//"login"
Without baseUrl, the return_url will be /authorize?response_type=..., but it should be /oauth/authorize?....