From 3b2c1f2ba4ce5a1babd0864c2ebd08c055090190 Mon Sep 17 00:00:00 2001 From: StarNumber12046 <64470722+StarNumber12046@users.noreply.github.com> Date: Thu, 19 Sep 2024 18:41:36 +0200 Subject: [PATCH] Fix token login :) --- app/login.tsx | 14 +++++++++----- app/tokenLogin.tsx | 4 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/login.tsx b/app/login.tsx index 2aeef5d..6f39bb7 100644 --- a/app/login.tsx +++ b/app/login.tsx @@ -135,10 +135,15 @@ export default function LoginScreen() { onChange={handleChange} > - - Not working? Try Token Login - - {error} + + + Not working? Try{" "} + + Token Login + + + {error} + (""); const [refreshToken, setRefreshToken] = useState(""); async function login() { - AsyncStorage.setItem("authToken", accessToken); - AsyncStorage.setItem("refreshToken", refreshToken); + await AsyncStorage.setItem("authToken", accessToken); + await AsyncStorage.setItem("refreshToken", refreshToken); router.push("/onboarding"); } const [error, setError] = useState("");