Dee
Dee

Reputation: 111

Change default token timeout expire to configurable in identity server 4 without using cookies

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

Answers (1)

Richard
Richard

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

Related Questions