Type alias GoTrueClientOptions

GoTrueClientOptions: {
    autoRefreshToken?: boolean;
    debug?: boolean | ((message: string, ...args: any[]) => void);
    detectSessionInUrl?: boolean;
    fetch?: Fetch;
    flowType?: AuthFlowType;
    hasCustomAuthorizationHeader?: boolean;
    headers?: {
        [key: string]: string;
    };
    lock?: LockFunc;
    persistSession?: boolean;
    storage?: SupportedStorage;
    storageKey?: string;
    url?: string;
    userStorage?: SupportedStorage;
}

Type declaration

  • Optional autoRefreshToken?: boolean
  • Optional debug?: boolean | ((message: string, ...args: any[]) => void)
  • Optional detectSessionInUrl?: boolean
  • Optional fetch?: Fetch
  • Optional flowType?: AuthFlowType
  • Optional Experimental hasCustomAuthorizationHeader?: boolean

    Set to "true" if there is a custom authorization header set globally.

  • Optional headers?: {
        [key: string]: string;
    }
    • [key: string]: string
  • Optional Experimental lock?: LockFunc

    Provide your own locking mechanism based on the environment. By default no locking is done at this time.

  • Optional persistSession?: boolean
  • Optional storage?: SupportedStorage
  • Optional storageKey?: string
  • Optional url?: string
  • Optional Experimental userStorage?: SupportedStorage

    Stores the user object in a separate storage location from the rest of the session data. When non-null, storage will only store a JSON object containing the access and refresh token and some adjacent metadata, while userStorage will only contain the user object under the key storageKey + '-user'.

    When this option is set and cookie storage is used, getSession() and other functions that load a session from the cookie store might not return back a user. It's very important to always use getUser() to fetch a user object in those scenarios.

Generated using TypeDoc