useAuth()
hook provides access to essential authentication methods and user session data from FutureverseAuthProvider
. It exposes the following methods and variables:
Example:
signIn()
auth-ui
library, ideal for building custom authentication flows. It accepts two parameters:
{SignInOptions}
: A Sign-in options object. The object can include the required type of authentication method, and the optionals the signer, and the account address.flow
: It is an optional parameter that determines the sign-in flow, which can be redirect
or popup
. It defaults to redirect
.signOutPass()
onBeforeRedirect
: Function to be executed before redirecting the user to logout page. Default is undefined.flow
: This parameter determines the sign-in flow, Silent or Redirect. It defaults to redirect
.disableConsent
: Boolean to skip the logout consent page. Default is set to true
.postRedirecturi
: URL to redirect the user after logout, it must be pre-registered in the client configuration. Default is undefined.authClient
FutureverseAuthClient
.
Example:
userSession
null)
authMethod
isFetchingSession
true
if loading, false
once complete). Use it to manage loading states in your UI.