diff --git a/src/pages/iAmSmart/AuthCallback/index.js b/src/pages/iAmSmart/AuthCallback/index.js index a87236a..b83ba04 100644 --- a/src/pages/iAmSmart/AuthCallback/index.js +++ b/src/pages/iAmSmart/AuthCallback/index.js @@ -56,8 +56,11 @@ const Index = () => { }, onError:(error)=>{ console.log(error); + window.location.assign("/iamsmart/loginFail"); } }); + }else{ + window.location.assign("/iamsmart/loginFail"); } } diff --git a/src/pages/iAmSmart/RegistryCallback/index.js b/src/pages/iAmSmart/RegistryCallback/index.js index 0c03fbe..ab69b32 100644 --- a/src/pages/iAmSmart/RegistryCallback/index.js +++ b/src/pages/iAmSmart/RegistryCallback/index.js @@ -27,14 +27,22 @@ const Index = () => { }, onSuccess: (responseData) => { navigate('/iAmSmartRegisterFrom', { state: { responseData: responseData } }); + }, + onFail: (response)=>{ + console.log("Fail"); + console.log(response); + window.location.assign("/register"); + }, + onError:(error)=>{ + console.log(error); + window.location.assign("/register"); } }); + }else{ + window.location.assign("/register"); } } - - - return ( );