Skip to main content
This example demonstrates how to build a component that offers manual Sign In and Register options. This is useful if you disable autoRegister and loginOnMount to give the user explicit control.

Code example

React

Key implementation details

Configuration: You pass the partnerId and partnerToken directly to the useAuth hook. The login function reads these values internally.
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: 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.
Last modified on May 22, 2026