{"action":"created","issue":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/1626","labels_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/1626/labels{/name}","comments_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/1626/comments","events_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/1626/events","html_url":"https://github.com/IdentityServer/IdentityServer3/issues/1626","id":95387913,"number":1626,"title":"Updating Authentication Type after 2FA Auth (Partial Login)","user":{"login":"aosgo","id":9867956,"avatar_url":"https://avatars.githubusercontent.com/u/9867956?v=3","gravatar_id":"","url":"https://api.github.com/users/aosgo","html_url":"https://github.com/aosgo","followers_url":"https://api.github.com/users/aosgo/followers","following_url":"https://api.github.com/users/aosgo/following{/other_user}","gists_url":"https://api.github.com/users/aosgo/gists{/gist_id}","starred_url":"https://api.github.com/users/aosgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aosgo/subscriptions","organizations_url":"https://api.github.com/users/aosgo/orgs","repos_url":"https://api.github.com/users/aosgo/repos","events_url":"https://api.github.com/users/aosgo/events{/privacy}","received_events_url":"https://api.github.com/users/aosgo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"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},"milestone":null,"comments":7,"created_at":"2015-07-16T09:12:01Z","updated_at":"2015-08-14T14:50:04Z","closed_at":"2015-08-14T14:50:03Z","body":"We have implemented 2FA using a Partial Login, but ideally we'd like to change the Authentication Type (amr claim) to reflect that they have used 2FA to sign-in. Possibly a dumb question but is it possible to update the Authentication Type after the user has \"logged in\"? The user has the option to use 2FA but it's not mandatory.\r\n\r\nI've looked at the sample (https://github.com/IdentityServer/IdentityServer3.Samples/tree/master/source/AspNetIdentity_2fa) although we don't use ASP Net Identity but our implementation is the same concept as per #249 \r\n\r\nIn this file https://github.com/IdentityServer/IdentityServer3.Samples/blob/master/source/AspNetIdentity_2fa/WebHost/Controllers/TwoFactorController.cs#L51\r\n\r\nWe'd ideally like to do the following:\r\n\r\n`**Update Authentication Type to reflect \"2FA\" rather than external**`\r\n`var resumeUrl = authentication.Identity.Claims.Single(x => x.Type == Constants.ClaimTypes.PartialLoginReturnUrl).Value;`\r\n`return Redirect(resumeUrl);`\r\n\r\nI've tried:\r\n`var authenticationResult = await ctx.Authentication.AuthenticateAsync(Constants.PartialSignInAuthenticationType);`\r\n`var id = new ClaimsIdentity(authenticationResult.Identity.Claims, \"2FA\");\r\nvar authenticationManager = ctx.Authentication;\r\nauthenticationManager.SignIn(id);\r\nvar resumeUrl = authenticationResult.Identity.Claims.Single(x => x.Type == Constants.ClaimTypes.PartialLoginReturnUrl).Value;\r\nreturn Redirect(resumeUrl);`\r\n\r\nIf not any suggestions please on how to tell IdSrv that user has successfully used 2FA, then their identity would reflect this for each subsequent validation to IdSrv"},"comment":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/comments/131133507","html_url":"https://github.com/IdentityServer/IdentityServer3/issues/1626#issuecomment-131133507","issue_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/1626","id":131133507,"user":{"login":"aosgo","id":9867956,"avatar_url":"https://avatars.githubusercontent.com/u/9867956?v=3","gravatar_id":"","url":"https://api.github.com/users/aosgo","html_url":"https://github.com/aosgo","followers_url":"https://api.github.com/users/aosgo/followers","following_url":"https://api.github.com/users/aosgo/following{/other_user}","gists_url":"https://api.github.com/users/aosgo/gists{/gist_id}","starred_url":"https://api.github.com/users/aosgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aosgo/subscriptions","organizations_url":"https://api.github.com/users/aosgo/orgs","repos_url":"https://api.github.com/users/aosgo/repos","events_url":"https://api.github.com/users/aosgo/events{/privacy}","received_events_url":"https://api.github.com/users/aosgo/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T14:50:03Z","updated_at":"2015-08-14T14:50:03Z","body":"No, but the business decided to make 2FA mandatory so I ended up setting it in the  AuthenticateResult in our custom user service. \r\n\r\nThanks for your help anyway"}}