login user implemented
This commit was merged in pull request #8.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user