diff --git a/src/pages/auth/InviteAcceptPage.tsx b/src/pages/auth/InviteAcceptPage.tsx index 19b8db1..b4f905f 100644 --- a/src/pages/auth/InviteAcceptPage.tsx +++ b/src/pages/auth/InviteAcceptPage.tsx @@ -11,7 +11,7 @@ export default function InviteAcceptPage() { const navigate = useNavigate(); const [searchParams] = useSearchParams(); const token = searchParams.get("token") || ""; - const { login } = useAuth(); + const { refreshUser, checkOrgAdmin } = useAuth(); const [name, setName] = useState(""); const [password, setPassword] = useState(""); @@ -63,6 +63,8 @@ export default function InviteAcceptPage() { // Store the token manually since we're not using the normal login flow localStorage.setItem("secuird_token", result.token); } + await refreshUser(); + await checkOrgAdmin(); navigate("/profile"); } catch (err: unknown) { const msg = err instanceof ApiError ? err.message : "Failed to accept invite.";