AccountReturn
uses useEffect
On every page, where a sign-in comes back to: it finishes it (the atproto library's useAccount), and says what
went wrong if it didn't work.
import { useAccount } from "#codebase/tcmts/atproto"; import { toasts } from "#codebase/tcmts/share"; import { useEffect } from "react"; export function AccountReturn() { const { error } = useAccount(); useEffect(() => { if (error) toasts.add({ title: "Signing in didn't work", description: error }, { timeout: 8000 }); }, [error]); // (rendering, if only nothing: a component, which a server page refers to rather than runs) return <></>; }