From 4e0de3be06531258bfdef0b5f1a1cac9ba4ff6e6 Mon Sep 17 00:00:00 2001 From: Mathis Date: Thu, 20 Jun 2024 14:56:35 +0200 Subject: [PATCH] feat(apiRequest): use JSON.parse for accessToken in Authorization header The Authorization header in the apiRequest now utilizes JSON.parse for the accessToken. This change ensures proper parsing and retrieval of the item from the local storage when the window object is defined. --- src/components/auth-form.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/auth-form.tsx b/src/components/auth-form.tsx index 929d9a5..252b31f 100644 --- a/src/components/auth-form.tsx +++ b/src/components/auth-form.tsx @@ -88,7 +88,8 @@ export function AuthForms() { owned_cryptos: [], }, }); - setSub(ReqRes.data.access_token?.toString()); + + setSub(ReqRes.data.access_token); } console.debug(ReqRes.data.message || "Not additional message from request"); return {