IdentityTokenを更新する正しい方法は何ですか。暗黙のフローを使用しています。IdentityTokenLifetimeの有効期限が切れたときにユーザーが認証されない
app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
{
ClientId = ConfigurationManager.AppSettings["IdSrv.ClientId"],
Authority = ConfigurationManager.AppSettings["IdSrv.Authority"],
AuthenticationType = "MySTS",
ResponseType = "id_token token", //Implicit Flow
Scope = "openid name email",
RedirectUri = ConfigurationManager.AppSettings["IdSrv.RedirectUri"],
PostLogoutRedirectUri = ConfigurationManager.AppSettings["IdSrv.PostLogoutRedirectUri"],
SignInAsAuthenticationType = "OAuth Bearer",
});
IdentityTokenLifetimeのデフォルト値は300(= 5分)です。その時間が経過すると、ユーザーは認証されなくなります。ステータス401(およびprompt=none
を返す)を返す必要があります。そのため、ミドルウェアはIdentityServer3にリダイレクトされ、再び戻されます。別の方法がありますか?理論的には
すべての変更をあなたはこのを見てみましょう:https://stackoverflow.com/questions/46867531/identityserver4-has-to -authenticate-twice – stt106