login user implemented

This commit was merged in pull request #8.
This commit is contained in:
victorAnumudu
2023-04-14 19:49:59 +01:00
parent 9103a812b5
commit c17f95351f
6 changed files with 20 additions and 13 deletions
+3 -3
View File
@@ -77,7 +77,7 @@ const AuthInit: FC<WithChildren> = ({children}) => {
} catch (error) {
console.error(error)
if (!didRequest.current) {
logout()
// logout()
}
} finally {
setShowSplashScreen(false)
@@ -86,8 +86,8 @@ const AuthInit: FC<WithChildren> = ({children}) => {
return () => (didRequest.current = true)
}
if (auth && auth.api_token) {
requestUser(auth.api_token)
if (auth && auth.session_token) {
requestUser(auth.session_token)
} else {
logout()
setShowSplashScreen(false)