{"action":"opened","issue":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2723","repository_url":"https://api.github.com/repos/IdentityServer/IdentityServer3","labels_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2723/labels{/name}","comments_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2723/comments","events_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2723/events","html_url":"https://github.com/IdentityServer/IdentityServer3/issues/2723","id":142274668,"number":2723,"title":"AuthenticateLocalAsync not working","user":{"login":"mabusall","id":11206353,"avatar_url":"https://avatars.githubusercontent.com/u/11206353?v=3","gravatar_id":"","url":"https://api.github.com/users/mabusall","html_url":"https://github.com/mabusall","followers_url":"https://api.github.com/users/mabusall/followers","following_url":"https://api.github.com/users/mabusall/following{/other_user}","gists_url":"https://api.github.com/users/mabusall/gists{/gist_id}","starred_url":"https://api.github.com/users/mabusall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mabusall/subscriptions","organizations_url":"https://api.github.com/users/mabusall/orgs","repos_url":"https://api.github.com/users/mabusall/repos","events_url":"https://api.github.com/users/mabusall/events{/privacy}","received_events_url":"https://api.github.com/users/mabusall/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-21T07:25:35Z","updated_at":"2016-03-21T07:25:35Z","closed_at":null,"body":"- [ ] I read and understood how to enable [logging](https://identityserver.github.io/Documentation/docsv2/configuration/logging.html)\r\n\r\n### Question / Issue\r\n\r\nDears,\r\n\r\nI have problem AuthenticateLocalAsync not called when i use custom login page, i used custom login page to fit my web site style... i don't what i miss when i post username and password it called login controller to execute my code, and i can't authenticate IdentityServer3 to get token and so on...\r\n\r\nmy question is how to get authenticated when i call custom login page using my username and password\r\n\r\n\r\ncode on server:\r\nvar userService = new Services.CustomUsersService();\r\n\r\n            var factory = new IdentityServerServiceFactory()\r\n                               .UseInMemoryUsers(Users.Get())\r\n                               .UseInMemoryClients(Clients.Get())\r\n                               .UseInMemoryScopes(Scopes.Get());\r\n            factory.UserService = new Registration<IUserService, Services.CustomUsersService>();\r\n\r\n            app.Map(\"/identity\", idsrvApp =>\r\n            {\r\n                idsrvApp.UseIdentityServer(new IdentityServerOptions\r\n                {\r\n                    SiteName = \"Test IdentityServer3\",\r\n                    SigningCertificate = LoadCertificate(),\r\n                    Factory = factory,\r\n                    AuthenticationOptions = new IdentityServer3.Core.Configuration.AuthenticationOptions\r\n                    {\r\n                        EnablePostSignOutAutoRedirect = true\r\n                    }\r\n                });\r\n            });\r\n\r\n\r\npublic class CustomUsersService : IdentityServer3.Core.Services.Default.UserServiceBase\r\n{\r\n      OwinContext ctx;\r\n\r\n      public CustomUsersService(OwinEnvironmentService owinEnv)\r\n        {\r\n            ctx = new OwinContext(owinEnv.Environment);\r\n        }\r\n}\r\n\r\npublic override Task PreAuthenticateAsync(PreAuthenticationContext context)\r\n{\r\n            var id = ctx.Request.Query.Get(\"signin\");\r\n            context.AuthenticateResult = new AuthenticateResult(\"~/custom/login?id=\" + id (IEnumerable<Claim>)null);\r\n\r\n            return Task.FromResult(0);\r\n        }\r\n\r\npublic override Task AuthenticateLocalAsync(LocalAuthenticationContext context)\r\n        {\r\n            METHOD NOT CALLED\r\n        }\r\n\r\nPlease Advise,\r\nThank you"}}