{"action":"created","issue":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2036","labels_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2036/labels{/name}","comments_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2036/comments","events_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2036/events","html_url":"https://github.com/IdentityServer/IdentityServer3/issues/2036","id":111813804,"number":2036,"title":"How to redirect to login screen with error message from failed two factor authentication","user":{"login":"mirecg","id":11613589,"avatar_url":"https://avatars.githubusercontent.com/u/11613589?v=3","gravatar_id":"","url":"https://api.github.com/users/mirecg","html_url":"https://github.com/mirecg","followers_url":"https://api.github.com/users/mirecg/followers","following_url":"https://api.github.com/users/mirecg/following{/other_user}","gists_url":"https://api.github.com/users/mirecg/gists{/gist_id}","starred_url":"https://api.github.com/users/mirecg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirecg/subscriptions","organizations_url":"https://api.github.com/users/mirecg/orgs","repos_url":"https://api.github.com/users/mirecg/repos","events_url":"https://api.github.com/users/mirecg/events{/privacy}","received_events_url":"https://api.github.com/users/mirecg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-16T11:37:31Z","updated_at":"2015-10-16T15:25:45Z","closed_at":null,"body":"Hi, I'm trying 2fa scenario with client certificate as the second factor in two-factor authentication. \r\nI would like to handle the situation when the authentication using the 2nd factor fails, e.g. user has choosen wrong certificate. I want him to return back to login screen with displayed error that it has failed.\r\n\r\nLooking at the AspNetIdentity_2fa sample, I don't know how to achieve this from TwoFactorController, to send the error message to login screen. There is just return Redirect(resumeUrl)."},"comment":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/comments/148746052","html_url":"https://github.com/IdentityServer/IdentityServer3/issues/2036#issuecomment-148746052","issue_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2036","id":148746052,"user":{"login":"brockallen","id":649492,"avatar_url":"https://avatars.githubusercontent.com/u/649492?v=3","gravatar_id":"","url":"https://api.github.com/users/brockallen","html_url":"https://github.com/brockallen","followers_url":"https://api.github.com/users/brockallen/followers","following_url":"https://api.github.com/users/brockallen/following{/other_user}","gists_url":"https://api.github.com/users/brockallen/gists{/gist_id}","starred_url":"https://api.github.com/users/brockallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brockallen/subscriptions","organizations_url":"https://api.github.com/users/brockallen/orgs","repos_url":"https://api.github.com/users/brockallen/repos","events_url":"https://api.github.com/users/brockallen/events{/privacy}","received_events_url":"https://api.github.com/users/brockallen/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T15:25:45Z","updated_at":"2015-10-16T15:25:45Z","body":"Pass the error message you want in the ctor of the AuthenticateResult."}}