diff --git a/src/Core/Settings/GlobalSettings.cs b/src/Core/Settings/GlobalSettings.cs index b821f214db..cb4cf0086c 100644 --- a/src/Core/Settings/GlobalSettings.cs +++ b/src/Core/Settings/GlobalSettings.cs @@ -87,6 +87,8 @@ public class GlobalSettings : IGlobalSettings public virtual IPhishingDomainSettings PhishingDomain { get; set; } = new PhishingDomainSettings(); public virtual bool EnableEmailVerification { get; set; } + + public virtual int SendAccessTokenLifetimeInMinutes { get; set; } = 5; public virtual string KdfDefaultHashKey { get; set; } public virtual string PricingUri { get; set; } diff --git a/src/Identity/IdentityServer/StaticClients/SendClientBuilder.cs b/src/Identity/IdentityServer/StaticClients/SendClientBuilder.cs index ac72ff3500..3c40e46a3e 100644 --- a/src/Identity/IdentityServer/StaticClients/SendClientBuilder.cs +++ b/src/Identity/IdentityServer/StaticClients/SendClientBuilder.cs @@ -13,7 +13,7 @@ public static class SendClientBuilder { ClientId = BitwardenClient.Send, AllowedGrantTypes = new[] { SendAccessGrantValidator.GrantType }, - AccessTokenLifetime = 60 * 5, // 5 minutes // TODO: convert this to a global setting + AccessTokenLifetime = 60 * globalSettings.SendAccessTokenLifetimeInMinutes, // Do not allow refresh tokens to be issued. AllowOfflineAccess = false,