diff --git a/custom-login/src/Home.jsx b/custom-login/src/Home.jsx index f78bce0b..c30e3a2e 100644 --- a/custom-login/src/Home.jsx +++ b/custom-login/src/Home.jsx @@ -27,6 +27,8 @@ const Home = () => { } else { oktaAuth.getUser().then((info) => { setUserInfo(info); + }).catch((err) => { + console.error(err); }); } }, [authState, oktaAuth]); // Update if authState changes diff --git a/custom-login/src/Profile.jsx b/custom-login/src/Profile.jsx index b37ad1b4..23cd2070 100644 --- a/custom-login/src/Profile.jsx +++ b/custom-login/src/Profile.jsx @@ -25,6 +25,8 @@ const Profile = () => { } else { oktaAuth.getUser().then((info) => { setUserInfo(info); + }).catch((err) => { + console.error(err); }); } }, [authState, oktaAuth]); // Update if authState changes diff --git a/okta-hosted-login/src/Home.jsx b/okta-hosted-login/src/Home.jsx index 8e0b4231..dc348e51 100644 --- a/okta-hosted-login/src/Home.jsx +++ b/okta-hosted-login/src/Home.jsx @@ -25,6 +25,8 @@ const Home = () => { } else { oktaAuth.getUser().then((info) => { setUserInfo(info); + }).catch((err) => { + console.error(err); }); } }, [authState, oktaAuth]); // Update if authState changes diff --git a/okta-hosted-login/src/Profile.jsx b/okta-hosted-login/src/Profile.jsx index b37ad1b4..23cd2070 100644 --- a/okta-hosted-login/src/Profile.jsx +++ b/okta-hosted-login/src/Profile.jsx @@ -25,6 +25,8 @@ const Profile = () => { } else { oktaAuth.getUser().then((info) => { setUserInfo(info); + }).catch((err) => { + console.error(err); }); } }, [authState, oktaAuth]); // Update if authState changes