8000 passport.authenticate loses session on success · Issue #314 · jaredhanson/passport · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
passport.authenticate loses session on success #314
Open
@mapocosm

Description

@mapocosm

I have passport working very well with facebook and google as providers. I am testing login and logout cycles, and it seems the session is dropped from time to time. I'm using connect-dynamodb for the session store. In the auth callback as follows, the req.user object is always available:

app.get( '/auth/facebook/callback', 
    passport.authenticate( 'facebook', { failureRedirect: '/autherror' }), function(req, res) { 
        console.log( '/auth/facebook/callback, req.user = ' + JSON.stringify( req.user ) );
        res.redirect('/setup'); 
    } );

But then the /setup route, as below, will sometimes show req.user as undefined.

app.get('/setup', function(req, res)
{
    console.log( '/setup, req.user = ' + JSON.stringify( req.user ) );
});

Is this normal? Is the session supposed to drop after a login is successful?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0