Skip to content

Commit 1f91dfe

Browse files
chore: change service lifetime from transient to singleton for ITokenService and ITokenGenerator
1 parent e3aab2b commit 1f91dfe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Infrastructure/Services/Token/TokenExtension.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public static IServiceCollection AddJwt(this IServiceCollection services, IConfi
2626
JwtType jwtType = jwtSettings.Default!;
2727

2828
return services
29-
.AddTransient<ITokenService, DefaultTokenService>()
30-
.AddTransient<ITokenGenerator, TokenGenerator>()
29+
.AddSingleton<ITokenService, DefaultTokenService>()
30+
.AddSingleton<ITokenGenerator, TokenGenerator>()
3131
.AddAuthentication(authentication =>
3232
{
3333
authentication.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;

0 commit comments

Comments
 (0)