JavaScript SDK

@scute/auth-ui-react reference

Every export of @scute/auth-ui-react with its signature.

Peer dependencies: react and react-dom 18 or later. Depends on @scute/js-core and @scute/react-hooks; components and hooks need AuthContextProvider (except ScuteSignIn with preview).

Components#

ExportProps
ScuteSignInScuteSignInProps: appearance?, copy?, legal?, methods?, defaultEmail?, showLastUsed?, preview?, onSignedIn?
ScuteAuthGateScuteAuthGateProps: children, onAuthenticated?, renderView?, appearance?, copy?, legal?, methods?, defaultEmail?, showLastUsed?

Hooks#

HookSignature
useScuteAuthFlow(): state and actions; see Auth gate and headless
useScuteSignInStep() => { view, mood, errorCount }
useUserProfile() => UseUserProfileResult
useSessions() => UseSessionsResult
useAlternatePhones() => UseAlternatePhonesResult
useSecureAccount() => UseSecureAccountResult
useElementUserRoles(source: ElementsSource) => UseElementUserRolesResult
useElementAccessRequests(source, { kind?, status? }?) => UseElementAccessRequestsResult
useElementDecisionLog(source, { userId?, decision? }?) => UseElementDecisionLogResult

Functions and constants#

Export
getLastUsedMethod() => LastUsedMethod | null
markLastUsedMethod(method: LastUsedMethod) => void
RESEND_COOLDOWN_SECONDS30
APP_SETTINGS_UNAVAILABLE"app_settings_unavailable"

Types#

Type
ScuteSignInProps, ScuteSignInAppearance, ScuteSignInCopy, ScuteSignInLegal, ScuteSignInMethods, ScuteSignInPreview, ScuteSignInMoodSign-in props; see Sign-in component
ScuteSignInStep{ view, mood, errorCount }
ScuteAuthGatePropsGate props
ScuteAuthFlowThe useScuteAuthFlow() result
AuthFlowViewThe flow's views; see Views
SignInRefusalCode"user_banned" | "user_suspended" | "ip_blocked" | "country_blocked" | "security_block"
LastUsedMethod"email" | "phone" | "passkey" | "sso" or a provider name
UseUserProfileResult, UpdateMetaResultProfile hook
UseSessionsResult, SessionsResult, SessionsErrorCode, RevokeSessionResultSessions hook
AlternatePhone, AlternatePhoneErrorCode, AlternatePhonesResult, AddResult, VerifyResult, RemoveResult, UseAlternatePhonesResultPhones hook
SecureMethodKey, SecureMethod, EnrollPhase, SecureAccountError, UseSecureAccountResultMFA setup hook
ElementsSource, ElementActionResult, UseElementUserRolesResult, UseElementAccessRequestsResult, UseElementDecisionLogResultAdmin screen hooks

Guides: Sign-in component, Auth gate and headless, Account hooks, Admin screens.