{"action":"closed","issue":{"url":"https://api.github.com/repos/stefanbuck/sails-social-auth-example/issues/29","labels_url":"https://api.github.com/repos/stefanbuck/sails-social-auth-example/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/stefanbuck/sails-social-auth-example/issues/29/comments","events_url":"https://api.github.com/repos/stefanbuck/sails-social-auth-example/issues/29/events","html_url":"https://github.com/stefanbuck/sails-social-auth-example/issues/29","id":89739270,"number":29,"title":"Instructions for adding new Strategies","user":{"login":"angelxmoreno","id":363479,"avatar_url":"https://avatars.githubusercontent.com/u/363479?v=3","gravatar_id":"","url":"https://api.github.com/users/angelxmoreno","html_url":"https://github.com/angelxmoreno","followers_url":"https://api.github.com/users/angelxmoreno/followers","following_url":"https://api.github.com/users/angelxmoreno/following{/other_user}","gists_url":"https://api.github.com/users/angelxmoreno/gists{/gist_id}","starred_url":"https://api.github.com/users/angelxmoreno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angelxmoreno/subscriptions","organizations_url":"https://api.github.com/users/angelxmoreno/orgs","repos_url":"https://api.github.com/users/angelxmoreno/repos","events_url":"https://api.github.com/users/angelxmoreno/events{/privacy}","received_events_url":"https://api.github.com/users/angelxmoreno/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-20T08:36:05Z","updated_at":"2015-08-12T20:27:25Z","closed_at":"2015-08-12T20:27:25Z","body":"Could someone please provide instructions for adding new strategies?\r\n1. I installed `passport-instagram` via npm \r\n2. in my `config/express.js`\r\n  1. I added `InstagramStrategy = require('passport-instagram').Strategy`\r\n  2. I added a new entry for the InstagramStrategy like so\r\n```\r\npassport.use(new InstagramStrategy({\r\n      clientID: '---',\r\n      clientSecret: '---',\r\n      callbackURL: \"http://localhost:1337/auth/instagram/callback\"\r\n    }, verifyHandler));\r\n```\r\n3. In my AuthController.js i added an entry for Instagram\r\n```\r\ninstagram: function(req, res) {\r\n    passport.authenticate('instagram', { failureRedirect: '/login' }, function(err, user) {\r\n      req.logIn(user, function(err) {\r\n        console.log(err)\r\n        if (err) {\r\n          console.log(err);\r\n          res.view('500');\r\n          return;\r\n        }\r\n\r\n        res.redirect('/');\r\n        return;\r\n      });\r\n    })(req, res);\r\n  },\r\n```\r\n\r\n\r\nHowever when i try to go to `/auth/instagram` and I am redirected back to my app as i should but i get an error on the node saide saying: `[TypeError: Cannot read property 'uid' of undefined]`. What am I missing?"}}