{"action":"created","issue":{"url":"https://api.github.com/repos/iaincollins/next-auth/issues/18","repository_url":"https://api.github.com/repos/iaincollins/next-auth","labels_url":"https://api.github.com/repos/iaincollins/next-auth/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/iaincollins/next-auth/issues/18/comments","events_url":"https://api.github.com/repos/iaincollins/next-auth/issues/18/events","html_url":"https://github.com/iaincollins/next-auth/issues/18","id":296034346,"number":18,"title":"Allow using custom Passport LocalStrategy for local authentication","user":{"login":"kelleg1","id":28459184,"avatar_url":"https://avatars1.githubusercontent.com/u/28459184?v=4","gravatar_id":"","url":"https://api.github.com/users/kelleg1","html_url":"https://github.com/kelleg1","followers_url":"https://api.github.com/users/kelleg1/followers","following_url":"https://api.github.com/users/kelleg1/following{/other_user}","gists_url":"https://api.github.com/users/kelleg1/gists{/gist_id}","starred_url":"https://api.github.com/users/kelleg1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kelleg1/subscriptions","organizations_url":"https://api.github.com/users/kelleg1/orgs","repos_url":"https://api.github.com/users/kelleg1/repos","events_url":"https://api.github.com/users/kelleg1/events{/privacy}","received_events_url":"https://api.github.com/users/kelleg1/received_events","type":"User","site_admin":false},"labels":[{"id":818290555,"url":"https://api.github.com/repos/iaincollins/next-auth/labels/enhancement","name":"enhancement","color":"a2eeef","default":true},{"id":818290559,"url":"https://api.github.com/repos/iaincollins/next-auth/labels/question","name":"question","color":"d876e3","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-02-09T22:39:12Z","updated_at":"2018-05-25T16:35:37Z","closed_at":"2018-02-17T23:09:21Z","author_association":"NONE","body":"This is related to https://github.com/iaincollins/next-auth/issues/9 as it is about doing local authentication, but it is about using a custom Passport LocalStrategy I have written. Is it possible to use Passport LocalStrategy with next-auth? I tried creating a provider and passing the strategy in the Strategy property, but that wouldn't work. I wonder if I am doing something wrong. Does it only work with OAuth providers?\r\n\r\n```\r\nproviders.push({\r\n  providerName: 'Local Login',\r\n  providerOptions: {\r\n    scope: ['profile', 'email'],\r\n  },\r\n  Strategy: require('./passport/local-login'),\r\n  strategyOptions: {\r\n  },\r\n  getProfile(profile) {\r\n    // Normalize profile into one with {id, name, email} keys\r\n    return {\r\n      id: profile.id,\r\n      name: profile.displayName,\r\n      email: profile.emails[0].value,\r\n    };\r\n  }\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/iaincollins/next-auth/issues/comments/392113312","html_url":"https://github.com/iaincollins/next-auth/issues/18#issuecomment-392113312","issue_url":"https://api.github.com/repos/iaincollins/next-auth/issues/18","id":392113312,"user":{"login":"tcash11","id":107364,"avatar_url":"https://avatars0.githubusercontent.com/u/107364?v=4","gravatar_id":"","url":"https://api.github.com/users/tcash11","html_url":"https://github.com/tcash11","followers_url":"https://api.github.com/users/tcash11/followers","following_url":"https://api.github.com/users/tcash11/following{/other_user}","gists_url":"https://api.github.com/users/tcash11/gists{/gist_id}","starred_url":"https://api.github.com/users/tcash11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcash11/subscriptions","organizations_url":"https://api.github.com/users/tcash11/orgs","repos_url":"https://api.github.com/users/tcash11/repos","events_url":"https://api.github.com/users/tcash11/events{/privacy}","received_events_url":"https://api.github.com/users/tcash11/received_events","type":"User","site_admin":false},"created_at":"2018-05-25T16:35:36Z","updated_at":"2018-05-25T16:35:36Z","author_association":"NONE","body":"@iaincollins You mention in your previous post that \r\n\r\n> There is now the option to define a signIn() method in next-auth.providers.js. \r\n\r\nDid you mean next-auth.functions.js? or is there something we need to add in the providers file as well for a username/pw type local strategy?"}}
{"actor":{"display_login":"tcash11"}}