@deshina/agekey-core
v0.1.10
Published
Core AgeKey SDK package providing authentication and token management functionality.
Downloads
832
Readme
@deshina/agekey-core
Core AgeKey SDK package providing authentication and token management functionality.
Configuration
Environment Variables
The SDK supports reading the API base URL from environment variables:
- Node.js/React Native:
AGEKEY_API_BASE_URL - Vite/Web:
VITE_AGEKEY_API_BASE_URL(requires VITE_ prefix)
Initialization
import { init } from "@deshina/agekey-core";
// Option 1: Use environment variable (defaults to AGEKEY_API_BASE_URL)
init({
apiKey: "your-api-key"
});
// Option 2: Override with explicit apiBaseUrl
init({
apiKey: "your-api-key",
apiBaseUrl: "https://your-bubble-url.com/api/1.1/wf"
});
// Option 3: Legacy endpoint option (still supported for backward compatibility)
init({
apiKey: "your-api-key",
endpoint: "https://your-bubble-url.com/api/1.1/wf"
});Configuration Priority
config.apiBaseUrl(explicit override)config.endpoint(legacy, for backward compatibility)- Environment variable (
AGEKEY_API_BASE_URLorVITE_AGEKEY_API_BASE_URL) - Default:
https://api.agekey.com
