From 52af4eb20cbe7ffa2eea556106802e046b78a2a1 Mon Sep 17 00:00:00 2001 From: Leanstix Date: Tue, 10 Sep 2024 21:45:10 +0100 Subject: [PATCH] testing authentication --- app/login/components/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/login/components/index.js b/app/login/components/index.js index ffd8821..c402beb 100644 --- a/app/login/components/index.js +++ b/app/login/components/index.js @@ -31,16 +31,15 @@ export default function Login() { const authenticateWithToken = async (tokenData) => { setLoading(true); try { - // Replace with actual logic to validate the tokenData (e.g., making a request to the server) + // Use the token directly for authentication const res = await fetch(url, { method: "POST", headers: { "Content-Type": "application/json", Accept: "application/json", - secret_key: process.env.NEXT_PUBLIC_SECRET_KEY, + Authorization: `Bearer ${tokenData.token}`, // Pass the token in the Authorization header }, body: JSON.stringify({ - token: tokenData.token, device_token: crypto.randomUUID(), }), }); @@ -77,7 +76,7 @@ export default function Login() {

- Verifying + Verifying...