0
alin.andersen created
Hey!
OpenIddict seems to have a default access token lifetime of 1 hour. How can we change this number? I was not able to find any information on the web regarding this.
Also I could not find anything here: https://docs.abp.io/en/abp/latest/Modules/OpenIddict
Can you point me to in the right direction?
- ABP Framework version: v6.0.0
- UI type: Blazor
- DB provider: EF Core
- Tiered (MVC)
2 Answer(s)
-
0
Hi, this issue doesn't seem to be related to ABP but you should be able to do it similar to the code below.
PreConfigure<OpenIddictServerBuilder>(builder => { builder. ... // In production, it is recommended to use two RSA certificates, one for encryption, one for signing. .SetAccessTokenLifetime(TimeSpan.FromDays(365)) .SetIdentityTokenLifetime(TimeSpan.FromDays(365)); });
-
0
Found the methods I needed:
PreConfigure<OpenIddictBuilder>(builder => { builder.AddServer(x => { x.SetAccessTokenLifetime(...); x.SetIdentityTokenLifetime(...); x.SetRefreshTokenLifetime(...); }); })
Thanks!