<Login />
function Login(props: {
children?: ReactNode
components?: OryFlowComponentOverrides
config: OryClientConfiguration
flow: LoginFlow
lastUsedMethodStorage?: LastUsedMethodStorage
onError?: OryErrorHandler
onSuccess?: OrySuccessHandler
onValidationError?: OryValidationErrorHandler
transientPayload?: OryTransientPayload
}): Element
The Login component is used to render the login flow in Ory Elements.
It provides the necessary context and components for the login flow, allowing you to customize the appearance and behavior of the login form.
Parameters
| Parameter | Type | Description |
|---|---|---|
props | { children?: ReactNode; components?: OryFlowComponentOverrides; config: OryClientConfiguration; flow: LoginFlow; lastUsedMethodStorage?: LastUsedMethodStorage; onError?: OryErrorHandler; onSuccess?: OrySuccessHandler; onValidationError?: OryValidationErrorHandler; transientPayload?: OryTransientPayload; } | The props for the Login component. |
props.children? | ReactNode | Optional children to render If not provided, the default OrySelfServiceFlowCard will be rendered. |
props.components? | OryFlowComponentOverrides | Optional components to override the default ones. This allows you to customize the appearance and behavior of the login flow. |
props.config | OryClientConfiguration | The Ory client configuration object. This object contains the configuration for the Ory client, such as the base URL and other settings. |
props.flow | LoginFlow | The login flow object containing the state and data for the login process. |
props.lastUsedMethodStorage? | LastUsedMethodStorage | Optional storage for the last used login method, which Ory Elements keeps when config.project.show_last_used_method is true. Defaults to window.localStorage. Pass the same storage to Login and Registration. Both flows record the method, and a flow without it uses window.localStorage. See LastUsedMethodStorage |
props.onError? | OryErrorHandler | Optional callback invoked on flow-level errors. See OryErrorHandler |
props.onSuccess? | OrySuccessHandler | Optional callback invoked on successful flow completion. See OrySuccessHandler |
props.onValidationError? | OryValidationErrorHandler | Optional callback invoked when the flow returns validation errors. See OryValidationErrorHandler |
props.transientPayload? | OryTransientPayload | Optional transient payload to include in flow submissions. Accepts a static object or a function that receives form values at submission time and returns the payload. See OryTransientPayload |
Returns
Element