diff --git a/jams-react-client/src/auth.js b/jams-react-client/src/auth.js index 036081463aa6ede28ef89eff226e51e4acb2fd9d..baa784b75532b19032954db64692e412172fcc82 100644 --- a/jams-react-client/src/auth.js +++ b/jams-react-client/src/auth.js @@ -143,7 +143,13 @@ class Auth { this.authenticated = true; cb() }).catch((error) => { - console.log("Error during API request on checkLastKnownStep: " + error); + if(error.response.status == 401){ + this.authenticated = false; + console.log("Error during API request on checkLastKnowStep not authenticated!"); + } + else{ + console.log("Error during API request on checkLastKnowStep: " + error); + } cb() }) } diff --git a/jams-react-client/src/configured.route.js b/jams-react-client/src/configured.route.js index c5718ee98d426f5ed354ec182c212bbad397a193..d0434b94da6fa3f847a9f6da8a556cb0645d0793 100644 --- a/jams-react-client/src/configured.route.js +++ b/jams-react-client/src/configured.route.js @@ -26,6 +26,8 @@ export const ConfiguredRoute = ({ component: Component, ...rest }) => { console.log('Error no matching path for configuration') } + }else { + return <SignIn /> } } else { return <SignUp step={0}/>