Skip to content

zidane-ui/auth

import { … } from 'zidane-ui/auth'ui/src/auth/index.ts

Functions#

useSignInFunction#

zidane-ui/auth: useSignIn, which runs a host's browser sign-in for a component and follows it for BrowserSignIn. The SignInFlow a host returns is zidane-ui/auth/headless.

TypeScript
function useSignIn(onDone?: (account?: string) => void): SignInHandle
Parameters
NameTypeDescription
onDone?(account?: string) => void

Called once when a sign-in ends signed in.

ui/src/auth/useSignIn.ts:33

Interfaces#

SignInHandleInterface#

A sign-in a component runs.

TypeScript
interface SignInHandle
SignInHandle properties
NameTypeDescription
cancel() => void

Stops the sign-in and forgets it.

start(begin: () => SignInFlow) => void

Starts a sign-in, replacing one in progress.

stateOnboardingSignInState | null

Where the sign-in is. It is null before the sign-in starts.

submit?(text: string) => void

Answers a question or passes a pasted code. Absent: the flow takes no input.

ui/src/auth/useSignIn.ts:17