add some debug info
This commit is contained in:
@@ -36,7 +36,6 @@ public class AuthService
|
||||
{
|
||||
Console.WriteLine($"=== ValidateWithBackend: Sending Google credential for {email} ===");
|
||||
|
||||
// Wyślij Google credential do backendu
|
||||
var response = await _httpClient.PostAsJsonAsync("Auth/apiToken", googleCredential);
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
@@ -53,11 +52,9 @@ public class AuthService
|
||||
AvatarUrl = avatarUrl
|
||||
};
|
||||
|
||||
// Zapisz do localStorage
|
||||
await _jsRuntime.InvokeVoidAsync("localStorage.setItem", "api_token", _apiToken);
|
||||
await _jsRuntime.InvokeVoidAsync("localStorage.setItem", "user_info", JsonSerializer.Serialize(_userInfo));
|
||||
|
||||
// Ustaw header dla przyszłych requestów
|
||||
_httpClient.DefaultRequestHeaders.Authorization =
|
||||
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _apiToken);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user