私は、これはデフォルトは約15〜20分を与えるように見えた前に1時間にトークンの寿命を延ばすIdentityServerWithAspNetIdentity
// OpenID Connect hybrid flow and client credentials client (MVC)
new Client
{
ClientId = "mvc",
ClientName = "MVC Client",
AllowedGrantTypes = GrantTypes.HybridAndClientCredentials,
RequireConsent = false,
ClientSecrets =
{
new Secret("LynxJournal".Sha256())
},
//RedirectUris = { "http://localhost:5002/signin-oidc" },
//PostLogoutRedirectUris = { "http://localhost:5002" },
RedirectUris = { serverConfig["MvcClientUrl"] + "/signin-oidc" },
PostLogoutRedirectUris = { serverConfig["MvcClientUrl"] },
IdentityTokenLifetime = 3600,
AccessTokenLifetime = 3600,
AuthorizationCodeLifetime = 3600,
AllowedScopes =
{
StandardScopes.OpenId.Name,
StandardScopes.Profile.Name,
StandardScopes.OfflineAccess.Name,
"api1"
}
}
のConfig.csにClientオブジェクトを変更しました。 IdentityTokenLifetime、AccessTokenLifetime、およびAuthorizationCodeLifetimeの値を追加しました。
@Scott Bradyが提供する情報を使用して、IdentyServerWithAspNetIdentityプロジェクトのConfig.csファイルを変更してそこに設定されているクライアントオブジェクトを変更しました。以下の解決策の修正を参照してください –