Documentation Index
Fetch the complete documentation index at: https://developer.suki.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
This example demonstrates how to build a component that offers manual Sign In and Register options. This is useful if you disableautoRegister and loginOnMount to give the user explicit control.
Code example
React
Key implementation details
Configuration
Configuration
Configuration: You pass the
partnerId and partnerToken directly to the useAuth hook. The login function reads these values internally.Error handling
Error handling
Error handling: The hook provides an error object (typically a Platform error) that updates automatically if an operation fails. You should display this to the user.
Registration
Registration
Registration: The
registerUser function accepts an object containing user details. The exact fields required depend on your specific partner configuration.If you set
autoRegister: true in the hook configuration, you generally do not need a separate Register User button. The SDK will handle account creation during the sign-in attempt if the user does not exist.