@comms-id/sign-in-react
The Sign in with Comms.ID button for React: a link to your app's own sign-in route. Your server runs the sign-in with @comms-id/sign-in/flow; the button holds no key and calls nothing.
import { SignInButton } from "@comms-id/sign-in-react";
<SignInButton start="/auth/sign-in" signInClass="team" returnTo="/account" />;
// <a href="/auth/sign-in?class=team&return_to=%2Faccount">Sign in with Comms.ID</a>
start: your start route, a path or an https URL on the page's own origin (/auth/sign-inby default). Anything that could leave your origin is refused, and the button links nowhere (onInvalid,console.errorby default).signInClass:person(the default) orteam.returnTo: a path of your app.label: the text.- It renders the link on the server too, starts once (a second press does nothing), and is ready again on a page restored from the back-forward cache.
useSignIn(options)givesstateandgetButtonProps()for your own markup.- Style it with the
--comms-id-*variables or thecomms-id-sign-inclass.