Class

HiyveAuth

HiyveAuth(config)

Constructor

# new HiyveAuth(config)

Parameters:
Name Type Attributes Default Description
config object
apiKey string <optional>

Hiyve public API key (pk_live_* or pk_test_*). Required unless baseUrl is set.

baseUrl string <optional>

Full base URL for proxy mode (e.g. '/api/hiyve/identity'). When set, apiKey is not required.

environment 'production' | 'development' <optional>
'production'

Target environment

basePath string <optional>
'/identity/auth'

API base path (ignored when baseUrl is set)

tokenStorage 'localStorage' | 'memory' <optional>
'localStorage'
autoRefresh boolean <optional>
true
refreshBuffer number <optional>
300

Seconds before expiry to auto-refresh

timeout number <optional>
30000

Request timeout in ms