Next.js

Auth flows

Drive sign-in, sign-up, recovery, invitation, and verification flows from code.

useSignIn()

useSignIn() is the stateful sign-in hook behind <SignInForm />, OtherSignInOptions, and the rest of the embedded sign-in flow. It creates sign-in attempts, keeps the latest in-progress attempt in memory, and exposes the continuation methods that move that attempt through verification, profile completion, SSO, or passkey sign-in.

export default function PasswordSignIn() {  const { loading, signIn, signinAttempt } = useSignIn();  async function submit() {    if (loading) {      return;    }    await signIn.createStrategy('email')({      email: 'jane@example.com',      password: 'correct horse battery staple',    });  }  return (    <div>      <button onClick={submit}>Sign in</button>      {signinAttempt ? <p>Current step: {signinAttempt.current_step}</p> : null}    </div>  );}
loading?: boolean | undefined;
Stays `true` until `useClient()` is ready. While loading is true, the hook does not expose a usable `signIn` object.
signIn?: { createStrategy; prepareVerification; completeVerification; completeProfile; identify; initEnterpriseSso } | undefined;
The stateful sign-in controller. This is where the embedded sign-in form gets its strategy builders and its continuation methods.
createStrategy?: (strategy: 'username' | 'email' | 'phone' | 'email_otp' | 'magic_link' | 'oauth' | 'passkey' | 'generic') => Function | undefined;
Returns the function for a specific sign-in strategy. The returned function posts the first sign-in request and stores the latest sign-in attempt when the response includes one.
username?: ({ username: string; password: string }) => Promise<ApiResult<Session>> | undefined;
Starts a username/password sign-in.
email?: ({ email: string; password: string }) => Promise<ApiResult<Session>> | undefined;
Starts an email/password sign-in.
phone?: ({ phone: string }) => Promise<ApiResult<Session>> | undefined;
Starts a phone OTP sign-in.
email_otp?: ({ email: string }) => Promise<ApiResult<Session>> | undefined;
Starts an email OTP sign-in.
magic_link?: ({ email: string }) => Promise<ApiResult<Session>> | undefined;
Starts a magic-link sign-in.
oauth?: ({ provider: OAuthProvider; redirectUri?: string }) => Promise<ApiResult<{ oauth_url: string; session: Session }>> | undefined;
Starts a social OAuth sign-in. When the request succeeds, the hook immediately assigns `window.location.href` to the returned provider URL.
passkey?: () => Promise<ApiResult<Session>> | undefined;
Starts a passkey sign-in. The hook requests browser WebAuthn credentials, converts the browser response, and completes the sign-in.
generic?: ({ email?: string; username?: string; password?: string; phone?: string; strategy?: string }) => Promise<ApiResult<Session>> | undefined;
The mixed strategy used by `SignInForm`. It lets the form submit identifier-first flows without committing to one builder up front.
prepareVerification?: (params: { strategy: 'email_otp'; redirectUri?: string } | { strategy: 'phone_otp'; lastDigits?: string } | { strategy: 'magic_link'; redirectUri?: string }) => Promise<ApiResult<{ otp_sent?: boolean; masked_phone?: string; masked_email?: string; verification_method?: string }>> | undefined;
Prepares the next verification step for the current sign-in attempt. This is what the embedded flow uses before OTP and magic-link verification screens.
completeVerification?: (verificationCode: string) => Promise<Session> | undefined;
Submits a verification code for the current attempt and updates `signinAttempt` with the latest server state.
completeProfile?: (data: ProfileCompletionData) => Promise<Session> | undefined;
Finishes the profile-completion step when the sign-in flow requires missing user fields before finalizing the session.
first_name?: string | undefined | undefined;
First name collected during profile completion.
last_name?: string | undefined | undefined;
Last name collected during profile completion.
username?: string | undefined | undefined;
Username collected during profile completion.
phone_number?: string | undefined | undefined;
Phone number collected during profile completion.
phone_country_code?: string | undefined | undefined;
Phone country code sent with the phone number when the flow collects one.
email?: string | undefined | undefined;
Email collected during profile completion.
identify?: (identifier: string) => Promise<{ strategy: "sso" | "social" | "password"; connection_id?: string; idp_url?: string; provider?: string }> | undefined;
Looks up the identifier-first result for an entered email or username. `SignInForm` uses this to decide whether to show password entry, enterprise SSO, or a social handoff.
initEnterpriseSso?: (connectionId: string, redirectUri?: string) => Promise<{ sso_url: string; session: Session }> | undefined;
Starts an enterprise SSO redirect for a known connection.
signinAttempt?: SigninAttempt | null | undefined;
The latest in-progress sign-in attempt captured by the hook. Embedded auth screens use this to decide which step to render next.
id?: string | undefined;
Stable identifier for the current attempt.
email?: string | undefined;
Email associated with the attempt when one is available.
method?: 'plain' | 'sso' | 'passkey' | undefined;
High-level sign-in method behind the current attempt.
sso_provider?: 'x_oauth' | 'github_oauth' | 'gitlab_oauth' | 'google_oauth' | 'facebook_oauth' | 'microsoft_oauth' | 'linkedin_oauth' | 'discord_oauth' | undefined;
Social or SSO provider attached to the attempt when relevant.
current_step?: 'verify_password' | 'verify_email' | 'verify_email_link' | 'verify_email_otp' | 'verify_phone' | 'verify_phone_otp' | 'verify_second_factor' | 'add_second_factor' | 'complete_profile' | undefined;
Current step in the sign-in state machine.
first_method_authenticated?: boolean | undefined;
Whether the first factor has already been completed.
second_method_authenticated?: boolean | undefined;
Whether the second factor has already been completed.
second_method_authentication_required?: boolean | undefined;
Whether this attempt still requires a second factor.
available_2fa_methods?: string[] | undefined | undefined;
Available second-factor methods when the attempt is waiting for a 2FA choice.
completed?: boolean | undefined;
Whether the attempt has fully finished.
requires_completion?: boolean | undefined | undefined;
Whether profile completion is still required.
required_fields?: string[] | undefined | undefined;
Fields the flow requires before the attempt can complete.
missing_fields?: string[] | undefined | undefined;
Fields still missing from the attempt.
profile_completion_data?: ProfileCompletionData | undefined | undefined;
Partial profile data already collected during the sign-in flow.
first_name?: string | undefined | undefined;
Collected first name.
last_name?: string | undefined | undefined;
Collected last name.
username?: string | undefined | undefined;
Collected username.
phone_number?: string | undefined | undefined;
Collected phone number.
phone_country_code?: string | undefined | undefined;
Collected phone country code.
email?: string | undefined | undefined;
Collected email.
discardSignInAttempt?: () => void | undefined;
Clears the in-memory sign-in attempt and returns the hook to its initial local state.
setSignInAttempt?: (attempt: SigninAttempt | null) => void | undefined;
Lets higher-level components restore or replace the current attempt explicitly. `SignInForm` uses this when it resumes a stored or returned attempt.

useSignUp()

useSignUp() is the stateful sign-up hook behind <SignUpForm />. It creates the sign-up attempt, keeps the latest in-progress signup attempt in memory, prepares the verification step that comes next, completes OTP verification, and validates deployment invitations before the user submits the form.

export default function EmailSignUp() {  const { loading, signUp, signupAttempt } = useSignUp();  async function submit() {    if (loading) {      return;    }    await signUp.create({      email: 'jane@example.com',      password: 'CorrectHorseBatteryStaple123!',    });  }  return (    <div>      <button onClick={submit}>Create account</button>      {signupAttempt ? <p>Current step: {signupAttempt.current_step}</p> : null}    </div>  );}
loading?: boolean | undefined;
Stays `true` until `useClient()` is ready. While loading is true, the hook does not expose a usable `signUp` object.
signUp: { create; prepareVerification; completeVerification; validateDeploymentInvitation };
The stateful sign-up controller used by the embedded sign-up form.
create?: (params: SignUpParams) => Promise<ApiResult<unknown>> | undefined;
Starts a sign-up attempt with the submitted user fields. When the response includes `session.signup_attempts`, the hook stores the latest one in `signupAttempt`.
prepareVerification?: (params: { strategy: 'email_otp'; redirectUri?: string } | { strategy: 'phone_otp'; lastDigits?: string }) => Promise<ApiResult<{ otp_sent?: boolean; masked_phone?: string; masked_email?: string; verification_method?: string }>> | undefined;
Prepares the verification step for the current sign-up attempt. This is what `SignUpForm` uses after `create()` has moved the flow into email or phone verification.
completeVerification?: (verificationCode: string) => Promise<ApiResult<Session>> | undefined;
Submits an OTP for the current sign-up attempt and updates `signupAttempt` with the latest attempt state when the server returns one.
validateDeploymentInvitation?: (token: string) => Promise<{ valid: boolean; first_name?: string; last_name?: string; email?: string; message?: string; error_code?: string }> | undefined;
Validates an invitation token before the user submits the form and returns any prefilled invitation data that should shape the form.
valid?: boolean | undefined;
Whether the invitation token is valid.
first_name?: string | undefined | undefined;
Invited first name when the invitation contains one.
last_name?: string | undefined | undefined;
Invited last name when the invitation contains one.
email?: string | undefined | undefined;
Invited email address when the invitation contains one.
message?: string | undefined | undefined;
Validation message for invalid or failed invitation checks.
error_code?: string | undefined | undefined;
Error code describing why invitation validation failed.
signupAttempt: SignupAttempt | null;
The latest in-progress sign-up attempt captured by the hook. Embedded sign-up screens use this to decide which verification step comes next.
id?: string | undefined;
Stable identifier for the current sign-up attempt.
first_name?: string | undefined;
Collected first name for the attempt.
last_name?: string | undefined;
Collected last name for the attempt.
email?: string | undefined;
Collected email for the attempt.
username?: string | undefined;
Collected username for the attempt.
phone_number?: string | undefined;
Collected phone number for the attempt.
required_fields?: string[] | undefined;
Fields the deployment still requires for the attempt.
missing_fields?: string[] | undefined;
Fields that are still missing from the attempt.
current_step?: 'verify_email' | 'verify_phone' | 'verify_authenticator' | undefined;
Current sign-up verification step.
remaining_steps?: ('verify_email' | 'verify_phone' | 'verify_authenticator')[] | undefined;
Verification steps that still remain after the current one.
completed?: boolean | undefined;
Whether the sign-up attempt has fully finished.
discardSignupAttempt: () => void;
Clears the in-memory sign-up attempt and returns the hook to its initial local state.

useSSOCallback()

useSSOCallback() is the headless callback hook behind <SSOCallback />. It reads the OAuth query params on mount, decides whether the callback belongs to a sign-in flow or a social-connection flow, exchanges the callback with the backend, and exposes the returned session, redirect target, and any unfinished sign-in attempt.

export default function SsoCallbackPage() {  const { loading, error, processed, signinAttempt, redirectUri } = useSSOCallback();  if (!processed || loading) {    return <p>Completing sign in...</p>;  }  if (error) {    return <p>{error.message}</p>;  }  return (    <div>      <p>Callback processed.</p>      {signinAttempt ? <p>Next step: {signinAttempt.current_step}</p> : null}      {redirectUri ? <p>Redirect target: {redirectUri}</p> : null}    </div>  );}
loading: boolean;
Whether the callback exchange is currently running.
error: Error | null;
Callback error when the OAuth params are missing, invalid, or rejected.
session: Session | null;
Session returned by the callback exchange.
id?: number | undefined;
Session identifier.
active_signin?: SignIn | null | undefined;
Active sign-in for the returned session.
id?: string | undefined;
Active sign-in identifier.
user_id?: string | undefined;
User identifier attached to the active sign-in.
active_organization_membership_id?: string | undefined;
Active organization membership for this sign-in.
active_workspace_membership_id?: string | undefined;
Active workspace membership for this sign-in.
expiresAt?: string | undefined;
Sign-in expiry timestamp.
lastActiveAt?: string | undefined;
Last activity timestamp for the sign-in.
user?: CurrentUser | undefined;
User record attached to the active sign-in.
id?: string | undefined;
Current user identifier.
first_name?: string | undefined;
User first name.
last_name?: string | undefined;
User last name.
username?: string | undefined;
Username when one is set.
primary_email_address?: UserEmailAddress | undefined;
Primary email-address record.
email?: string | undefined;
Primary email address value.
verified?: boolean | undefined;
Whether the primary email address has been verified.
primary_phone_number?: UserPhoneNumber | undefined;
Primary phone-number record when one exists.
phone_number?: string | undefined;
Primary phone number value.
verified?: boolean | undefined;
Whether the primary phone number has been verified.
has_password?: boolean | undefined;
Whether the user has a password set.
has_passkeys?: boolean | undefined;
Whether the user has passkeys registered.
signins?: SignIn[] | undefined | undefined;
Sign-ins attached to the returned session.
[].id?: string | undefined;
Sign-in identifier.
[].active_organization_membership_id?: string | undefined;
Active organization membership for the sign-in.
[].active_workspace_membership_id?: string | undefined;
Active workspace membership for the sign-in.
[].expiresAt?: string | undefined;
Sign-in expiry timestamp.
[].lastActiveAt?: string | undefined;
Last activity timestamp.
[].browser?: string | undefined;
Browser recorded for the sign-in.
[].device?: string | undefined;
Device recorded for the sign-in.
[].city?: string | undefined;
City recorded for the sign-in.
[].region?: string | undefined;
Region recorded for the sign-in.
[].country?: string | undefined;
Country recorded for the sign-in.
signin_attempts?: SigninAttempt[] | undefined | undefined;
Sign-in attempts returned with the session.
[].id?: string | undefined;
Sign-in-attempt identifier.
[].email?: string | undefined;
Email associated with the attempt.
[].method?: 'plain' | 'sso' | 'passkey' | undefined;
High-level sign-in method behind the attempt.
[].sso_provider?: 'x_oauth' | 'github_oauth' | 'gitlab_oauth' | 'google_oauth' | 'facebook_oauth' | 'microsoft_oauth' | 'linkedin_oauth' | 'discord_oauth' | undefined;
Provider attached to the attempt when relevant.
[].current_step?: 'verify_password' | 'verify_email' | 'verify_email_link' | 'verify_email_otp' | 'verify_phone' | 'verify_phone_otp' | 'verify_second_factor' | 'add_second_factor' | 'complete_profile' | undefined;
Current step for the attempt.
[].first_method_authenticated?: boolean | undefined;
Whether the first factor has completed.
[].second_method_authenticated?: boolean | undefined;
Whether the second factor has completed.
[].second_method_authentication_required?: boolean | undefined;
Whether the attempt still requires a second factor.
[].available_2fa_methods?: string[] | undefined | undefined;
Available second-factor methods.
[].completed?: boolean | undefined;
Whether the attempt has fully finished.
[].requires_completion?: boolean | undefined | undefined;
Whether the sign-in still needs profile completion.
[].missing_fields?: string[] | undefined | undefined;
Fields still missing from the attempt.
[].required_fields?: string[] | undefined | undefined;
Fields required for the attempt to complete.
redirectUri: string | null;
Redirect target returned by the callback exchange when one is available.
processed: boolean;
Whether the hook has already inspected the callback URL and finished its first processing pass.
signinAttempt: SigninAttempt | null;
Latest sign-in attempt returned by the callback exchange when the sign-in flow still has work left to do.
id?: string | undefined;
Stable identifier for the returned attempt.
method?: 'plain' | 'sso' | 'passkey' | undefined;
Sign-in method attached to the callback result.
current_step?: 'verify_password' | 'verify_email' | 'verify_email_link' | 'verify_email_otp' | 'verify_phone' | 'verify_phone_otp' | 'verify_second_factor' | 'add_second_factor' | 'complete_profile' | undefined;
Current step for the unfinished sign-in flow.
completed?: boolean | undefined;
Whether the returned attempt has fully finished.
second_method_authentication_required?: boolean | undefined;
Whether the returned attempt still requires a second factor.
available_2fa_methods?: string[] | undefined | undefined;
Available second-factor methods when the attempt is waiting for one.
requires_completion?: boolean | undefined | undefined;
Whether the sign-in still needs profile completion.

useWaitlist()

useWaitlist() is the headless waitlist hook behind <WaitlistForm />. It submits the waitlist fields to the active deployment and returns the created waitlist entry so the page can decide how to show success.

export default function JoinWaitlist() {  const { loading, joinWaitlist } = useWaitlist();  async function submit() {    if (loading) {      return;    }    await joinWaitlist({      first_name: 'Jane',      last_name: 'Doe',      email: 'jane@example.com',    });  }  return <button onClick={submit}>Join waitlist</button>;}
loading: boolean;
Whether the shared client is still loading or a waitlist request is currently running.
joinWaitlist: (params: { first_name: string; last_name: string; email: string }) => Promise<ApiResult<WaitlistResponse>>;
Submits a waitlist entry for the active deployment.
first_name?: string | undefined;
Submitted first name.
last_name?: string | undefined;
Submitted last name.
email?: string | undefined;
Submitted email address.
message?: string | undefined;
Success message returned after the waitlist entry is created.
entry?: WaitlistEntry | undefined;
Created waitlist entry.
id?: string | undefined;
Waitlist-entry identifier.
deployment_id?: number | undefined;
Deployment identifier that owns the waitlist entry.
email_address?: string | undefined;
Stored email address for the waitlist entry.
first_name?: string | undefined;
Stored first name.
last_name?: string | undefined;
Stored last name.
created_at?: string | undefined;
Creation timestamp for the waitlist entry.
updated_at?: string | undefined;
Last update timestamp for the waitlist entry.

useForgotPassword()

useForgotPassword() is the headless password-recovery hook behind ForgotPassword. It starts the reset flow for an email address, verifies the OTP that comes back to the user, and then exchanges the reset token for a new session when the password is changed.

export default function ForgotPasswordFlow() {  const { loading, forgotPassword, verifyOtp, resetPassword } = useForgotPassword();  async function run() {    if (loading) {      return;    }    await forgotPassword('jane@example.com');    const verification = await verifyOtp('jane@example.com', '123456');    if ('data' in verification) {      await resetPassword(verification.data.token, 'NewPassword123!');    }  }  return <button onClick={run}>Reset password</button>;}
loading: boolean;
Whether the shared client is still loading.
forgotPassword: (email: string) => Promise<ApiResult<{}>>;
Starts the password-reset flow for an email address.
verifyOtp: (email: string, otp: string) => Promise<ApiResult<{ token: string }>>;
Verifies the OTP from the recovery email and returns the reset token used by the final password-reset step.
token?: string | undefined;
Reset token that must be passed to `resetPassword()`.
resetPassword: (token: string, password: string) => Promise<ApiResult<Session>>;
Resets the password with the verified reset token and returns the resulting session.
id?: number | undefined;
Session identifier.
active_signin?: SignIn | null | undefined;
Active sign-in for the returned session.
id?: string | undefined;
Active sign-in identifier.
active_organization_membership_id?: string | undefined;
Active organization membership for the sign-in.
active_workspace_membership_id?: string | undefined;
Active workspace membership for the sign-in.
expiresAt?: string | undefined;
Sign-in expiry timestamp.
lastActiveAt?: string | undefined;
Last activity timestamp for the sign-in.
signin_attempts?: SigninAttempt[] | undefined | undefined;
Sign-in attempts returned with the session.
[].id?: string | undefined;
Sign-in-attempt identifier.
[].current_step?: 'verify_password' | 'verify_email' | 'verify_email_link' | 'verify_email_otp' | 'verify_phone' | 'verify_phone_otp' | 'verify_second_factor' | 'add_second_factor' | 'complete_profile' | undefined;
Current step for the sign-in attempt.
[].completed?: boolean | undefined;
Whether the sign-in attempt has fully finished.
[].second_method_authentication_required?: boolean | undefined;
Whether the sign-in still requires a second factor.

useMagicLinkVerification()

useMagicLinkVerification() is the headless verification hook behind <MagicLinkVerification />. It verifies the callback token and attempt pair, tracks whether verification is still running, and exposes a simple success state for the page that owns the redirect after verification completes.

export default function MagicLinkPage() {  const { loading, success, verifyMagicLink } = useMagicLinkVerification();  async function verify() {    await verifyMagicLink({      token: 'magic-link-token',      attempt: 'signin-attempt-id',      redirectUri: window.location.href,    });  }  return (    <div>      <button onClick={verify}>Verify magic link</button>      {loading ? <p>Verifying…</p> : null}      {success === true ? <p>Verified.</p> : null}    </div>  );}
loading: boolean;
Whether the hook is still waiting for the shared client or is currently verifying the magic link.
verifyMagicLink: (params: { token?: string; attempt?: string; redirectUri?: string }) => Promise<ApiResult<{}>>;
Verifies a magic-link token and the associated attempt identifier.
token?: string | undefined | undefined;
Magic-link token returned in the callback URL.
attempt?: string | undefined | undefined;
Sign-in attempt identifier returned in the callback URL.
redirectUri?: string | undefined | undefined;
Optional redirect target to carry through the verification request.
success: boolean | null;
Verification outcome. `null` means the current request has not finished yet, `true` means verification succeeded, and `false` means the last verification attempt failed.

useInvitation()

useInvitation() is the headless invitation-acceptance hook behind <AcceptInvite />. It accepts an invitation token, stores the last returned invitation result, exposes a loading state for the active request, and keeps a reset path so the page can clear the last result before trying again.

export default function InvitationPage() {  const { acceptInvitation, invitationData, loading, error } = useInvitation();  async function accept() {    await acceptInvitation('invite-token');  }  return (    <div>      <button onClick={accept} disabled={loading}>        Accept invitation      </button>      {error ? <p>{error}</p> : null}      {invitationData?.organization ? <p>{invitationData.organization.name}</p> : null}    </div>  );}
acceptInvitation: (token: string) => Promise<AcceptInvitationResponse>;
Accepts an invitation token and returns the invitation result.
organization?: { id: string; name: string } | undefined | undefined;
Organization that the invitation belongs to when one is returned.
id?: string | undefined;
Organization identifier.
name?: string | undefined;
Organization name.
workspace?: { id: string; name: string } | undefined | undefined;
Workspace that the invitation belongs to when one is returned.
id?: string | undefined;
Workspace identifier.
name?: string | undefined;
Workspace name.
signin_id?: string | undefined | undefined;
Sign-in identifier returned when the accepted invitation is attached to a specific sign-in.
already_member?: boolean | undefined | undefined;
Whether the invited user is already a member.
message?: string | undefined | undefined;
Human-readable message returned with the invitation result.
requires_signin?: boolean | undefined | undefined;
Whether the user must sign in before the invitation can be completed.
invited_email?: string | undefined | undefined;
Email address that the invitation expects.
error_code?: string | undefined | undefined;
Error code when the invitation could not be accepted cleanly.
invitationData: AcceptInvitationResponse | null;
Last invitation result returned by `acceptInvitation()`.
organization?: { id: string; name: string } | undefined | undefined;
Accepted organization when one is returned.
workspace?: { id: string; name: string } | undefined | undefined;
Accepted workspace when one is returned.
signin_id?: string | undefined | undefined;
Returned sign-in identifier when one is present.
already_member?: boolean | undefined | undefined;
Whether the invited user was already a member.
message?: string | undefined | undefined;
Returned invitation message.
requires_signin?: boolean | undefined | undefined;
Whether the invitation still requires sign-in.
invited_email?: string | undefined | undefined;
Expected invited email address.
error_code?: string | undefined | undefined;
Returned error code when acceptance failed.
loading: boolean;
Whether an invitation-acceptance request is currently running.
error: string | null;
Current invitation error message.
reset: () => void;
Clears the current error and invitation result so the UI can retry from a clean state.

useUserSignins()

useUserSignins() is the headless session-list hook behind the active-sessions section in <ManageAccount />. It loads the current user’s sign-in records with SWR, exposes a way to sign out one of those records, and keeps a manual refetch path so the UI can refresh after a mutation.

export default function ActiveSessions() {  const { signins, loading, removeSignin } = useUserSignins();  async function endFirstSession() {    if (!signins?.length) {      return;    }    await removeSignin(signins[0].id);  }  return (    <div>      <button onClick={endFirstSession} disabled={loading}>        End first session      </button>      <p>Sessions: {signins?.length ?? 0}</p>    </div>  );}
signins: SignIn[] | undefined;
Sign-in records attached to the current user.
[].id?: string | undefined;
Sign-in identifier.
[].user_id?: string | undefined;
User identifier attached to the sign-in.
[].active_organization_membership_id?: string | undefined;
Active organization membership for the sign-in.
[].active_workspace_membership_id?: string | undefined;
Active workspace membership for the sign-in.
[].expiresAt?: string | undefined;
Sign-in expiry timestamp.
[].lastActiveAt?: string | undefined;
Last activity timestamp for the sign-in.
[].ipAddress?: string | undefined;
IP address recorded for the sign-in.
[].browser?: string | undefined;
Browser recorded for the sign-in.
[].device?: string | undefined;
Device recorded for the sign-in.
[].city?: string | undefined;
City recorded for the sign-in.
[].region?: string | undefined;
Region recorded for the sign-in.
[].regionCode?: string | undefined;
Region code recorded for the sign-in.
[].country?: string | undefined;
Country recorded for the sign-in.
[].countryCode?: string | undefined;
Country code recorded for the sign-in.
[].user?: CurrentUser | undefined;
User record attached to the sign-in.
id?: string | undefined;
Current user identifier.
first_name?: string | undefined;
User first name.
last_name?: string | undefined;
User last name.
username?: string | undefined;
Username when one is set.
error: Error | null;
SWR error for the current sign-ins query.
removeSignin: (id: string) => Promise<ApiResult<unknown>>;
Signs out one specific sign-in record.
refetch: () => Promise<SignIn[] | undefined>;
Revalidates the sign-ins query and returns the latest list from SWR.
loading: boolean;
Whether the shared client or the sign-ins query is still loading.