redirect fails to the api login endpoint
This commit is contained in:
parent
323cfe55df
commit
18d52123ef
@ -68,10 +68,10 @@ class Authenticator {
|
|||||||
*
|
*
|
||||||
* @param {string} name Name of strategy used, auth middleware is also bound to authenticator[name]
|
* @param {string} name Name of strategy used, auth middleware is also bound to authenticator[name]
|
||||||
* @param {Strategy} strategy Passport strategy
|
* @param {Strategy} strategy Passport strategy
|
||||||
* @param {object} [{ failureRedirect = '/login/fail', successRedirect = '/home' }={}]
|
* @param {object} [{ failureRedirect = '/api/login/fail', successRedirect = '/home' }={}]
|
||||||
* @memberof Authenticator
|
* @memberof Authenticator
|
||||||
*/
|
*/
|
||||||
addStrategy (name, strategy, { failureRedirect = '/login/fail', successRedirect } = {}) {
|
addStrategy (name, strategy, { failureRedirect = '/api/login/fail', successRedirect } = {}) {
|
||||||
this.logger.info(`Adding ${name} authentication strategy`);
|
this.logger.info(`Adding ${name} authentication strategy`);
|
||||||
this.passport.use(name, strategy);
|
this.passport.use(name, strategy);
|
||||||
// Quick access getter to get the middleware for authenticating
|
// Quick access getter to get the middleware for authenticating
|
||||||
|
Loading…
Reference in New Issue
Block a user