Edit this page

UAuth Moralis Library

The @uauth/moralis library is a middleware library used for integrating UAuth with Moralis applications.

UAuthMoralisConnector

The default export for the @uauth/moralis library.

Copy
Copied
class UAuthMoralisConnector extends AbstractWeb3Connector

activate()

Copy
Copied
public async activate({
    chainId: providedChainId,
    mobileLinks,
} = {}): Promise<any>

disconnect()

Discconnects any walletconnect provider and calls uauth.logout().

Copy
Copied
public async deactivate()

setUAuthOptions

Sets the static UAuthConstructorOptions member of the class.

Copy
Copied
public static setUAuthOptions(_options: UAuthConnectorOptions)

uauth

Returns the uauth member of the class instance.

Copy
Copied
public get uauth(): UAuth

UAuthConnectorOptions

The configuration options object passed to the UAuthMoralisConnector constructor.

Copy
Copied
interface UAuthConnectorOptions extends Partial<UAuthConstructorOptions> {
  uauth?: UAuth;
  connectors: UAuthMoralisConnectors;
  shouldLoginWithRedirect?: boolean;
}

shouldLoginWithRedirect

If shouldLoginWithRedirect is set to true, the UAuthMoralisConnector instance will use the login() method instead of the default, loginWithPopup().

UAuthMoralisConnectors

Copy
Copied
interface UAuthMoralisConnectors {
  injected: any | undefined;
  walletconnect: any | undefined;
}