Options
All
  • Public
  • Public/Protected
  • All
Menu

Export Actions

Hierarchy

  • OffChainAction
    • AuthAction

Index

Constructors

  • Constructor needs NetworkType passing as parameter.

    Returns AuthAction

Properties

authProvider: AuthProvider

AuthProvider provides all methods to handle authentication actions.

cookieProvider: CookieProvider

CookieProvider provides all methods to handle cookie actions.

oauthProvider: OAuthProvider

OAuthProvider provides all methods to handle fetching/patching oauth data.

storageProvider: StorageProvider

Storage provides all methods to handle storage actions.

userProvider: UserProvider

UserProvider provides all methods to handle fetching/patching user data.

Methods

  • Connect Discord account to current UID using Discord exchange code.

    Parameters

    Returns Promise<AuthEntity>

  • Connect new email to UID

    Parameters

    Returns Promise<User>

  • Connect new wallet to UID

    Parameters

    Returns Promise<AuthEntity>

  • isUserLoggedIn(): Promise<boolean>
  • Check whether a user is logged in

    Returns Promise<boolean>

  • isWalletExisted(walletAddress: string): Promise<boolean>
  • Check whether a wallet address is existed

    Parameters

    • walletAddress: string

    Returns Promise<boolean>

  • logout(): Promise<void>
  • Log user out of current session. Also remove access token from storage.

    Returns Promise<void>

  • removeCookieStorageCredential(): void
  • The function to remove cookie credential

    Returns void

  • removeCredential(): void
  • The function to remove credential

    Returns void

  • requestAuthChallenge(walletAddress: string): Promise<AuthChallenge>
  • Send challenge data to server to confirm action

    Parameters

    • walletAddress: string

    Returns Promise<AuthChallenge>

  • Connect new wallet to UID when forget/lost old wallets via email

    Parameters

    Returns Promise<AuthEntity>

  • sendEmailVerification(email: string): Promise<void>
  • Send otp verification via email

    Parameters

    • email: string

    Returns Promise<void>

  • setCookieStorageCredential(jwt: string): void
  • The function to modify/delete cookie credential

    Parameters

    • jwt: string

    Returns void

  • setCredential(jwt: string): void
  • The function to modify/delete credential

    Parameters

    • jwt: string

    Returns void

  • Sign user in. Persist access token to storage.

    Parameters

    Returns Promise<LoginResponse>

  • Sign user in using Discord exchange code. Persist access token to storage.

    Parameters

    Returns Promise<LoginResponse>

  • Sign user up. Persist access token to storage.

    Parameters

    Returns Promise<LoginResponse>

  • Sign user up using Discord exchange code. Persist access token to storage.

    Parameters

    Returns Promise<LoginResponse>

  • Verify a wallet whether it belongs to current user or not.

    Parameters

    Returns Promise<boolean>

Generated using TypeDoc