From c0b3773b16c4d9de10b07ca10151e57414e60bcf Mon Sep 17 00:00:00 2001 From: Jonathan Bourdon Date: Tue, 7 Jan 2025 03:13:18 -0500 Subject: [PATCH] Clean up LoginWithGoogle.cs --- src/Web/Features/Users/Handlers/LoginWithGoogle.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Web/Features/Users/Handlers/LoginWithGoogle.cs b/src/Web/Features/Users/Handlers/LoginWithGoogle.cs index 6743685..29c2ded 100644 --- a/src/Web/Features/Users/Handlers/LoginWithGoogle.cs +++ b/src/Web/Features/Users/Handlers/LoginWithGoogle.cs @@ -1,6 +1,5 @@ using System.Text.Json; using System.Text.Json.Serialization; -using Hutopy.Web.Common; using Hutopy.Web.Common.Security; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Options; @@ -32,6 +31,7 @@ public class GoogleUserInfo public record LoginWithGoogleRequest( string Token); +[PublicAPI] public record LoginWithGoogleResponse( string AccessToken, string RefreshToken); @@ -59,7 +59,7 @@ public class LoginWithGoogleHandler( // Verify the token with Google using var httpClient = httpClientFactory.CreateClient(); - var response = await httpClient.GetAsync( + using var response = await httpClient.GetAsync( $"https://www.googleapis.com/oauth2/v1/userinfo?access_token={googleToken.AccessToken}", ct); if (!response.IsSuccessStatusCode)