Function: useAuth()
useAuth():
UseAuthReturn
Redirect to the Monerium auth flow.
Returns
authorize- Redirects to the Monerium auth flow.siwe- Sign in with Ethereum. https://monerium.com/siweisAuthorized- Whether the user is authorized.isLoading- Whether the auth flow is loading.error- Error message if the auth flow fails.disconnect- Disconnect the user.revokeAccess- Revoke the user's access.
Example
const { authorize, isAuthorized, isLoading, error } = useAuth();
authorize(); // Redirects to the Monerium auth flow.
// Opt-in to automated wallet linking with these parameters.
authorize({ address, signature, chain }).