{"action":"created","issue":{"url":"https://api.github.com/repos/drstearns/passport-uwshib/issues/2","labels_url":"https://api.github.com/repos/drstearns/passport-uwshib/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/drstearns/passport-uwshib/issues/2/comments","events_url":"https://api.github.com/repos/drstearns/passport-uwshib/issues/2/events","html_url":"https://github.com/drstearns/passport-uwshib/issues/2","id":98624260,"number":2,"title":"Adding a callback for more flexibility","user":{"login":"websiddu","id":968912,"avatar_url":"https://avatars.githubusercontent.com/u/968912?v=3","gravatar_id":"","url":"https://api.github.com/users/websiddu","html_url":"https://github.com/websiddu","followers_url":"https://api.github.com/users/websiddu/followers","following_url":"https://api.github.com/users/websiddu/following{/other_user}","gists_url":"https://api.github.com/users/websiddu/gists{/gist_id}","starred_url":"https://api.github.com/users/websiddu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/websiddu/subscriptions","organizations_url":"https://api.github.com/users/websiddu/orgs","repos_url":"https://api.github.com/users/websiddu/repos","events_url":"https://api.github.com/users/websiddu/events{/privacy}","received_events_url":"https://api.github.com/users/websiddu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-02T17:43:59Z","updated_at":"2015-08-02T19:50:13Z","closed_at":null,"body":"`passport.serializeUser` dose not set the user object, req.user is always from `convertProfileToUser` function. But the seralizer data is set to `req._passport.session.user`. \r\n\r\nI think its will add more flexibility for the developer if there is a callback here.\r\nhttps://github.com/drstearns/passport-uwshib/blob/master/index.js#L102"},"comment":{"url":"https://api.github.com/repos/drstearns/passport-uwshib/issues/comments/127061778","html_url":"https://github.com/drstearns/passport-uwshib/issues/2#issuecomment-127061778","issue_url":"https://api.github.com/repos/drstearns/passport-uwshib/issues/2","id":127061778,"user":{"login":"websiddu","id":968912,"avatar_url":"https://avatars.githubusercontent.com/u/968912?v=3","gravatar_id":"","url":"https://api.github.com/users/websiddu","html_url":"https://github.com/websiddu","followers_url":"https://api.github.com/users/websiddu/followers","following_url":"https://api.github.com/users/websiddu/following{/other_user}","gists_url":"https://api.github.com/users/websiddu/gists{/gist_id}","starred_url":"https://api.github.com/users/websiddu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/websiddu/subscriptions","organizations_url":"https://api.github.com/users/websiddu/orgs","repos_url":"https://api.github.com/users/websiddu/repos","events_url":"https://api.github.com/users/websiddu/events{/privacy}","received_events_url":"https://api.github.com/users/websiddu/received_events","type":"User","site_admin":false},"created_at":"2015-08-02T19:50:13Z","updated_at":"2015-08-02T19:50:13Z","body":"I think, I understand what you are saying..Which makes sense.. But if you take the library passport-saml or passport-twitter they don't ask the user to seralize seperatley instead in the callback they set the user. \r\n\r\n```js \r\nvar SamlStrategy = require('passport-saml').Strategy;\r\n[...]\r\n\r\npassport.use(new SamlStrategy(\r\n  {\r\n    path: '/login/callback',\r\n    entryPoint: 'https://openidp.feide.no/simplesaml/saml2/idp/SSOService.php',\r\n    issuer: 'passport-saml'\r\n  },\r\n  function(profile, done) {\r\n    findByEmail(profile.email, function(err, user) {\r\n      if (err) {\r\n        return done(err);\r\n      }\r\n      return done(null, user);\r\n    });\r\n  })\r\n);\r\n```\r\n"}}