Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Express middleware not setCookie #617

Closed
dimensi opened this Issue Dec 18, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@dimensi
Copy link

dimensi commented Dec 18, 2017

Steps to reproduce

(First please check that this issue is not already solved as described
here
)

  • Tell us what broke. The more detailed the better.

I look

if (result.success) {
Object.assign(req, { authenticated: true }, result.data);
Object.assign(req.feathers, { authenticated: true }, result.data);
if (options.successRedirect && !options.__oauth) {
debug(`Redirecting to ${options.successRedirect}`);
res.status(302);
return res.redirect(options.successRedirect);
}
return next();

but i not see here logic for set cookie.

Expected behavior

Tell us what should happen

  app.post('/login', auth.express.authenticate('local',{ 
    successRedirect: '/',
    failureRedirect: '/bad',
  }));

will set cookie

Actual behavior

Tell us what happens instead
nothing happing, only redirect works.

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working):

NodeJS version: 9.3.0

Operating System: Arch

Browser Version: Chrome 63

@daffl

This comment has been minimized.

Copy link
Member

daffl commented Jan 22, 2018

There is now a recipe showing how to use Feathers authentication with Express middleware (including server side rendering) at https://docs.feathersjs.com/guides/auth/recipe.express-middleware.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.