System.InvalidOperationException: auth_time is missing
Hello guys, we are using IdentityServer4 version 2.2.0 and at some point (I have no steps to reproduce) we are getting following log entry:
System.InvalidOperationException: auth_time is missing.
at IdentityServer4.Extensions.PrincipalExtensions.GetAuthenticationTimeEpoch(IIdentity identity)
at IdentityServer4.Services.DefaultClaimsService.GetStandardSubjectClaims(ClaimsPrincipal subject)
at IdentityServer4.Services.DefaultClaimsService.<GetIdentityTokenClaimsAsync>d__3.MoveNext()
I'll improve issue description if needed, but currently I have no more information :-(
We are still getting auth_time is missing critical log entry. It seems only while user is logging in.
Except that critical log entry there seems to be no other issue.
Might be that I missed something but otherwise it looks like we are setting authentication time anywhere relevant.
I did reopen this issue. I still looking for clarification or otherwise to get rid of this issue.
You still have no steps to repro, so there's nothing we can do to investigate.
Any update?
Sorry but still no update. We have no steps to reproduce.
In that case I will close since there's no action we can take at this time. If you still have issues, and can provide repo steps, feel free to reopen.
Hi, I have the same issue , with identity server version 2.0.0-rc1 or version 2.1.0
InvalidOperationException: auth_time is missing. IdentityServer4.Extensions.PrincipalExtensions.GetAuthenticationTimeEpoch(IIdentity identity) in PrincipalExtensions.cs, line 52

@brockallen
@logcorner this might be the issue? https://github.com/IdentityServer/IdentityServer4/issues/2510#issuecomment-411871543
Hi, I tried this but it does not work. It works very well if I run it without docker (F5)
But if I run it using docker ( docker-compose ) , I have an exception.
I think I have some configuartion issues Regards
Le mer. 15 août 2018 à 16:53, Brock Allen [email protected] a écrit :
@logcorner https://github.com/logcorner this might be the issue? #2510 (comment) https://github.com/IdentityServer/IdentityServer4/issues/2510#issuecomment-411871543
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/IdentityServer/IdentityServer4/issues/2382#issuecomment-413222629, or mute the thread https://github.com/notifications/unsubscribe-auth/AE1PMydOppTA_HCMzyYkdKeGBoRSAcXGks5uRDXhgaJpZM4UmMnv .
I'm facing this issue when I run IdentityServer site with IISExpress. My client is an angular app with implicit grant flow. First authentication always happens without mistakes. To reproduce it I set small lifetime for id_token and access_token (60s and 180s), login in my application, then close tab with angular app. Then I open my angular app 15-30 mins later and try to login once again and that's how I usually reproduce it.
Hi! I'm facing the same issue (auth_time missing exception when trying to login after 15-30 mins after the first login)
Backend - STS (auth server): AspNetCore 2.2 + IdentityServer 2.4.0 + AspNetIdentity Backend - Web API: AspNetCore 2.2 Frontend: Angular 7 with oidc client with implicit flow.
IS4 client configuration:
new Client
{
ClientId = "webSPA",
ClientName = "MVC SPA Client",
AllowedGrantTypes = GrantTypes.Implicit,
AllowAccessTokensViaBrowser = true,
IdentityTokenLifetime = 3600,
AccessTokenLifetime = 3600,
// where to redirect to after login
RedirectUris = { "http://localhost:5002/signin-oidc" },
//RedirectUris = { "http://localhost:5002", },
// where to redirect to after logout
PostLogoutRedirectUris = { "http://localhost:5002/signout-callback-oidc" },
AllowedCorsOrigins = { "http://localhost:5002" },
AllowedScopes = new List<string>
{
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile,
JwtClaimTypes.AuthenticationTime,
"api1"
},
AlwaysIncludeUserClaimsInIdToken = true,
RequireConsent = false
},
Angular oidc client configuration:
openIdImplicitFlowConfiguration.stsServer = 'http://localhost:5000';
openIdImplicitFlowConfiguration.redirect_url = originUrl + 'signin-oidc';
openIdImplicitFlowConfiguration.client_id = 'webSPA';
openIdImplicitFlowConfiguration.response_type = 'id_token token';
openIdImplicitFlowConfiguration.scope = 'openid profile api1';
openIdImplicitFlowConfiguration.post_logout_redirect_uri = originUrl + 'signout-callback-oidc';
openIdImplicitFlowConfiguration.forbidden_route = '/forbidden';
openIdImplicitFlowConfiguration.unauthorized_route = '/unauthorized';
openIdImplicitFlowConfiguration.auto_userinfo = true;
openIdImplicitFlowConfiguration.log_console_warning_active = true;
openIdImplicitFlowConfiguration.log_console_debug_active = true;
openIdImplicitFlowConfiguration.max_id_token_iat_offset_allowed_in_seconds = 10;
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.