Components
Sign Up
Learn how to use the Nile Auth Sign Up component
Email + password
The <SignUpForm />
will create a new user in your database and create a session for them. Uses simple <Email />
and <Password />
fields, along with the useSignUp()
hook. In most cases, you want to supply a callbackUrl
, which is where the user will be redirected upon successful sign up and sign in.
Error handling
In the case of errors from the API, or you want to do something more custom with the response, a Response
object will come back from the onSuccess
function. This is true even for HTTP error status codes such as 4XX and 5XX. The API will return text informing you of the error, so simply use response.text()
to obtain your error, or response.json()
in the event that the API returned an ok
response.