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

Don't create a session after registering #98

Open
tbassetto opened this issue Apr 20, 2012 · 2 comments
Open

Don't create a session after registering #98

tbassetto opened this issue Apr 20, 2012 · 2 comments

Comments

@tbassetto
Copy link

Hi,

I would like to override what happen after a user has registered. I don't want people to be logged in automatically! If I understand well, I can override registerUser but it won't prevent the user to be logged in. addToSession() is called in any case :(

How can I do that?

Thanks

@porsager
Copy link

Hi, i am also very interested if someone could point to the right way of doing this.

@madhums
Copy link

madhums commented Apr 24, 2012

I guess you can also override addToSession() method. I don't know which auth you are using, but here is how you can do it for facebook auth.

UserSchema.plugin(mongooseAuth, {
    everymodule: {
      // everyauth configs
    }
  , facebook: {
      everyauth: {
          // facebook oauth configs
        , findOrCreateUser: function (sess, accessTok, accessTokExtra, fbUser) {
            // find or create
            return promise;
          }
        , addToSession: function (session, auth) {
            // do anything with the sessions
          }
      }
    }
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants