Answer the question
In order to leave comments, you need to log in
How to execute "passport.authenticate()" without redirects on completion (koa-passport)?
Hey!
I have a small SPA training project with Angular 2
a frontend and a RESTful backend in NodeJS / Коа
.
I want to tie authorization with koa-passport (local strategy)
.
Here is the code that is executed when the user logs out:
function*() {
yield passport.authenticate('local', {
successRedirect: '/',
failureRedirect: '/'
});
};
passport.authenticate()
or just an empty object is passed there, an error occurs. body
response, and in case of an error - false in the same place in body
. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question