Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AuthSDK
✓ import { AuthSDK } from 'postex-auth-sdk-stage'
✗ const AuthSDK = require('postex-auth-sdk-stage')
ESM-only package; CJS require fails. Use import or dynamic import.
AuthSDKConfig
✓ import type { AuthSDKConfig } from 'postex-auth-sdk-stage'
✗ import { AuthSDKConfig } from 'postex-auth-sdk-stage'
TypeScript type import only; not a runtime value. Use 'import type' to avoid bundling issues.
AuthStatusResponse
✓ import type { AuthStatusResponse } from 'postex-auth-sdk-stage'
✗ import { AuthStatusResponse } from 'postex-auth-sdk-stage'
TypeScript type import only; not a runtime value. Use 'import type' to avoid bundling issues.
InitiateAuthResponse
✓ import type { InitiateAuthResponse } from 'postex-auth-sdk-stage'
✗ import { InitiateAuthResponse } from 'postex-auth-sdk-stage'
TypeScript type import only; not a runtime value. Use 'import type' to avoid bundling issues.
Initializes the AuthSDK with environment variables, checks status, initiates authentication, and handles passkey or OTP flows.
import { AuthSDK } from 'postex-auth-sdk-stage';
const auth = new AuthSDK({
apiKey: process.env.API_KEY ?? '',
appId: 'postexglobal'
});
async function authenticate() {
try {
const status = await auth.getStatus({ email: 'user@example.com' });
const result = await auth.initiateAuth({ email: 'user@example.com' });
if (result.status === 'webauthn_challenge') {
const authResponse = await auth.authenticateWithPasskey({
challenge: result.challenge,
rp: result.rp,
credentialIds: result.credentialIds
});
console.log('Passkey authenticated', authResponse);
} else if (result.status === 'otp_sent') {
const otpResponse = await auth.verifyOTP('123456');
console.log('OTP verified', otpResponse);
}
} catch (error) {
console.error('Authentication failed', error);
}
}
authenticate();
Errors
Common errors & fixes
SyntaxError: Cannot use import statement outside a module
ESM-only package used with CommonJS/Node.js without "type": "module" in package.json
fixAdd "type": "module" to package.json or use dynamic import().
TypeError: auth.getStatus is not a function
Wrong import: likely imported as default instead of named
fixUse import { AuthSDK } from 'postex-auth-sdk-stage' instead of import AuthSDK from ... Request failed with status 400: {"error":"Unknown appId"}
Passed an invalid appId value
fixUse one of: 'xstak', 'postex', 'callcourier', 'postexglobal', 'postexsa'
Audit
Dependencies
No dependency data recorded yet.