From bb618e9cae923a2e8017af92ead997fe258dde01 Mon Sep 17 00:00:00 2001 From: antoineatstariongroup Date: Mon, 27 Jan 2025 11:37:19 +0100 Subject: [PATCH] JWT response as JSON --- CometServer/Modules/Authentication/AuthenticationModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CometServer/Modules/Authentication/AuthenticationModule.cs b/CometServer/Modules/Authentication/AuthenticationModule.cs index 0dba72ac..e1a5dbf9 100644 --- a/CometServer/Modules/Authentication/AuthenticationModule.cs +++ b/CometServer/Modules/Authentication/AuthenticationModule.cs @@ -69,7 +69,7 @@ public override void AddRoutes(IEndpointRouteBuilder app) { var token = jwtTokenService.CreateToken(authenticationPerson); res.StatusCode = 200; - await res.WriteAsync(token); + await res.AsJson(token); return; }