useGuestAuth
Authenticate as a Guest user for quick onboarding.
Use cases:- Allow users to try your app without registration.
- Useful for demos and instant-access experiences.
signUpGuest
: Signs up a guest and returns user + wallet.- Status flags:
isLoading
,isError
,isSuccess
.
import { useGuestAuth } from "@openfort/react"
function SampleComponent() {
const {
signUpGuest, // Sign up as a guest user.
isLoading, // Indicates if the hook is currently loading.
isError, // Indicates if the hook has encountered an error.
isSuccess, // Indicates if the hook has successfully completed.
error, // The error object if an error occurred, otherwise null.
} = useGuestAuth({
throwOnError, // Whether to throw errors.
onSuccess, // Callback function to execute on success.
onError, // Callback function to execute on error.
onSettled, // Callback function to execute when the operation is settled (either success or error).
})
// ...
}