Skip to main content

NhostVueClientConstructorParams

Parameters


region optional string

App region (e.g., eu-central-1) Not required in development (when subdomain is "localhost")


subdomain optional string

App subdomain (e.g, ieingiwnginwnfnegqwvdqwdwq) Should be used when using the Nhost platform Use "localhost" in development


adminSecret optional string

When set, the admin secret is sent as a header, x-hasura-admin-secret, for all requests to GraphQL, Storage, and Functions.


backendUrl optional string

Nhost backend URL Should only be used when self-hosting


devTools optional boolean

Activate devTools e.g. the ability to connect to the xstate inspector


autoSignIn optional boolean

When set to true, will parse the url on startup to check if it contains a refresh token to start the session with


autoRefreshToken optional boolean

When set to true, will automatically refresh token before it expires


clientStorage optional ClientStorage

Object where the refresh token will be persisted and read locally.

Recommended values:

  • 'web' and 'cookies': no value is required
  • 'react-native': import Storage from @react-native-async-storage/async-storage
  • 'cookies': localStorage
  • 'custom': an object that defines the following methods:
    • setItem or setItemAsync
    • getItem or getItemAsync
    • removeItem
  • 'capacitor': import { Storage } from @capacitor/storage
  • 'expo-secure-store': import * as SecureStore from 'expo-secure-store'

clientStorageType optional ClientStorageType

Define a way to get information about the refresh token and its exipration date.

@default

web


refreshIntervalTime optional number

Time interval until token refreshes, in seconds