diff --git a/apps/core/src/pages/sign-in.tsx b/apps/core/src/pages/sign-in.tsx index 91cf56513a..d59223101b 100644 --- a/apps/core/src/pages/sign-in.tsx +++ b/apps/core/src/pages/sign-in.tsx @@ -29,14 +29,16 @@ export const Component = () => { await onceSignedIn(); setAuthAtom(prev => ({ ...prev, onceSignedIn: undefined })); } - if (location.state.callbackURL) { + if (location.state?.callbackURL) { navigate(location.state.callbackURL, { replace: true, }); } } }; - afterSignedIn(); + afterSignedIn().catch(err => { + console.error(err); + }); }, [ location.state.callbackURL, loginStatus,