Reputation: 111
I have a web api project that is using idenity server. Would like to make the default timeout expire to configurable (15mins) which is defaulted to 1 hour now. I see few approaches using cookies in start up. But want to set the token expiration without using cookies. any help?
Upvotes: 1
Views: 868
Reputation: 1584
You can change the timeout for Access tokens and Identity tokens by modifying the Client's AccessTokenLifetime
and IdentityTokenLifetime
properties:
new IdentityServer4.Models.Client {
.
.
ClientId = "your-application",
IdentityTokenLifetime = 900,
AccessTokenLifetime = 900
}
Upvotes: 3