FutureverseAuthProvider

It supplies session-related methods and variable objects to the children and exposes the following properties:

  • signer

  • signIn()

  • signOut()

  • authClient

  • userSession

  • authMethod

  • isFetchingSession

Information and examples of the properties above can be found in the page for useAuth() of this guide.

In the code below, we instantiate FutureverseAuthClient and pass the initialized variable authClient as the property of the provider.

authClient is a required property.

Example:

import { FutureverseAuthClient, FutureverseWagmiProvider, FutureverseAuthProvider } from '@futureverse/auth-react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

const authClient = new FutureverseAuthClient({
  clientId,
  environment: 'production',
  redirectUri: '<your-app-redirect-endpoint>',
});

...
    <FutureverseAuthProvider authClient={authClient}>
      {children}
    </FutureverseAuthProvider>
...

Last updated

© 2023 -> ♾️