App Configuration

As the name suggests, App Configuration is a crucial endpoint in Block-Auth. On this page, we'll explore how to use this endpoint to retrieve your app's configuration settings programmatically.

The app configuration model

The app configuration model contains all the information about your Block-Auth application settings, such as customizable content, provider configurations, and UI preferences.

Properties

  • Name
    domain
    Type
    string
    Description

    The domain associated with your Block-Auth application.

  • Name
    config
    Type
    object
    Description

    An object containing all the configuration settings for your app.

  • Name
    config.content
    Type
    object
    Description

    Customizable content for your app, including titles, descriptions, and button labels in multiple languages.

  • Name
    config.providersColumns
    Type
    number
    Description

    The number of columns to display providers in the UI.

  • Name
    config.enableSearch
    Type
    boolean
    Description

    Whether to enable search functionality in the UI.

  • Name
    config.enableWebTypeFilter
    Type
    boolean
    Description

    Whether to enable web type filtering in the UI.

  • Name
    config.showProviderNameOnMobile
    Type
    boolean
    Description

    Whether to show provider names on mobile devices.

  • Name
    config.[providerName]
    Type
    object
    Description

    Configuration for each enabled provider (e.g., blockauth, phantom, microsoft, google, metamask).


GET/api/app

Get app configuration

This endpoint allows you to retrieve the configuration for your Block-Auth application. The response will include customizable content, provider settings, and UI preferences.

API - app

GET
/api/app
curl --location 'https://api.block-auth.io/api/app' \
--header 'Authorization: Bearer your_access_token_here'

Response

{
  "success": true,
  "message": {
    "domain": "dashboard.block-auth.io",
    "config": {
      "content": {
        "title": {
          "en": "Block-Auth is the easiest way to sign up and log in.",
          "es": "Block-Auth es la forma más fácil de registrarse e iniciar sesión."
        },
        "description": {
          "en": "Forget about passwords and protect your privacy with Europe GDPR.",
          "es": "Olvídate de contraseñas y protege tu privacidad con la GDPR europea."
        },
        "login": {
          "en": "Log In",
          "es": "Iniciar Sesión"
        },
        "lastStep": {
          "en": "Complete the last step",
          "es": "Completa el último paso"
        },
        "btns": {
          "changeAccount": {
            "en": "Change Account",
            "es": "Cambiar Cuenta"
          },
          "completeRegister": {
            "en": "Complete your register",
            "es": "Completa tu registro"
          },
          "connect": {
            "en": "Connect",
            "es": "Conectar"
          },
          "createAccount": {
            "en": "Create account now",
            "es": "Crear cuenta ahora"
          },
          "disconnect": {
            "en": "Disconnect",
            "es": "Desconectar"
          },
          "download": {
            "en": "Download",
            "es": "Descargar"
          },
          "logIn": {
            "en": "Log In",
            "es": "Inicia Sesión"
          },
          "selectChain": {
            "en": "Select Chain",
            "es": "Seleccionar Cadena"
          },
          "signed": {
            "en": "Log Out",
            "es": "Cerrar Sesión"
          },
          "signUp": {
            "en": "Sign Up",
            "es": "Regístrate"
          },
          "reviewApi": {
            "en": "Please, review your API Key and Secret",
            "es": "Por favor, revisa tu API Key y Secret"
          },
          "unlockOtp": {
            "en": "Unlock OTP",
            "es": "Desbloquear OTP"
          }
        },
        "footer": {
          "first": {
            "en": "Waiting a bored sign up?",
            "es": "¿Esperando un registro aburrido?"
          },
          "second": {
            "en": "Say goodbye to passwords",
            "es": "Di adiós a las contraseñas"
          },
          "url": "https://block-auth.io"
        }
      },
      "providersColumns": 2,
      "enableSearch": true,
      "enableWebTypeFilter": true,
      "showProviderNameOnMobile": true,
      "blockauth": {
        "enabled": true,
        "orderIndex": 1
      },
      "phantom": {
        "enabled": true,
        "orderIndex": 5
      },
      "microsoft": {
        "enabled": true,
        "orderIndex": 3
      },
      "google": {
        "enabled": true,
        "orderIndex": 2
      },
      "metamask": {
        "enabled": true,
        "orderIndex": 4
      }
    }
  }
}

Was this page helpful?