Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

examples/login vs http://passportjs.org/guide/facebook/ #31

Closed
ghost opened this Issue · 2 comments

2 participants

@ghost

Following the guide, and after clicking the login button resulted in this facebook redirect,

http://localhost:8080/auth/facebook/callback&code=AQC............

The example mentions,

passport.serializeUser(function(user, done) {
  done(null, user);
});

passport.deserializeUser(function(obj, done) {
  done(null, obj);
});

Adding that I could redirect to

http://localhost:8080/home#=

What is the importance of the serializers, here ?

@pavelnikolov

I don't want serializers too but it seems that passport requires them. I have a single page app and the backend uses passport-facebook to allow facebook logins. The serializers are completely unnecessary for me too since my client side only uses access_token (without session or cookies). Is there any way I can forbid cookies?

@jaredhanson
Owner

You can disable sessions setting the session option to false:

passport.authenticate('facebook', { session: false }),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.