-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Bug: Environment Variable Name Inconsistency
File:
packages/sdk-server/src/actions.ts
Description
The SDK currently hardcodes environment variable names for Turnkey credentials directly in the code, for example:
Code in file mentioned
const turnkeyClient = new TurnkeyServerSDK({
apiBaseUrl: process.env.NEXT_PUBLIC_BASE_URL!,
defaultOrganizationId: process.env.NEXT_PUBLIC_ORGANIZATION_ID!,
apiPrivateKey: process.env.TURNKEY_API_PRIVATE_KEY!,
apiPublicKey: process.env.TURNKEY_API_PUBLIC_KEY!,
});
Example that works in other setups:
const turnkey = new Turnkey({
defaultOrganizationId: process.env.TURNKEY_ORGANIZATION_ID,
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.TURNKEY_PUBLIC_API_KEY,
apiPrivateKey: process.env.TURNKEY_PRIVATE_API_KEY,
});
Notice the difference:
TURNKEY_API_PUBLIC_KEYvsTURNKEY_PUBLIC_API_KEYTURNKEY_API_PRIVATE_KEYvsTURNKEY_PRIVATE_API_KEY
Steps to Reproduce
- Set env vars to
TURNKEY_PUBLIC_API_KEYandTURNKEY_PRIVATE_API_KEY - Use SDK as in the repo (
TURNKEY_API_PUBLIC_KEY,TURNKEY_API_PRIVATE_KEY) - Keys will be undefined and authentication will fail
Expected Behavior
The SDK and all documentation/examples should use consistent environment variable names.
Actual Behavior
The env var names differ, leading to misconfiguration and runtime errors.
Screenshot
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
