Registry / auth-security / postex-auth-sdk-stage

postex-auth-sdk-stage

JSON →
library1.4.0jsnpmunverified

PostEx Authentication SDK (v1.4.0) provides a comprehensive solution for implementing secure authentication in web applications. Supports WebAuthn/Passkeys, OTP verification, magic link authentication, and DPoP (RFC 9449 compliant token binding). Features include multi-factor authentication, automatic token management, trusted device recognition, and browser feature detection. Ships TypeScript types. Active development with regular releases. Differentiators: includes DPoP support and passkey-first approach.

npm install postex-auth-sdk-stage
INSTALL
IMPORT
SIG · POSTEX-AUTH-SDK-ST
P
postex-auth-sdk-stage
auth-securityjavascriptv1.4.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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
musl
node 18226 runs
build_error
glibc
node 18226 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();
Debug
Known issues
breakingESM-only package: CommonJS require() will fail
fix
Use import syntax or dynamic import().
affects: >=1.0.0
gotchaappId parameter only accepts predefined values: 'xstak', 'postex', 'callcourier', 'postexglobal', 'postexsa'. Using an unknown value may cause runtime errors.
fix
Use one of the allowed values. Default is 'postexglobal'.
affects: >=1.0.0
gotchainitiateOTP() throws an error if both email and mobileNumber are missing/empty
fix
Provide at least one identifier: email or mobileNumber.
affects: >=1.0.0
deprecatedPassing a plain string to getStatus() or initiateAuth() may be deprecated in future versions
fix
Use object form: { email: '...' } or { mobileNumber: '...' }.
affects: >=1.0.0
gotchaTypeScript types are exported as types only (not runtime values). Attempting to use them at runtime will throw.
fix
Use 'import type' for all type-only imports.
affects: >=1.0.0
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
fix
Add "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
fix
Use 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
fix
Use one of: 'xstak', 'postex', 'callcourier', 'postexglobal', 'postexsa'
Upgrade
Version history
1.4.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
24
OpenAI (training)
1
Resources
postex-auth-sdk-stage — npm install postex-auth-sdk-stage · libregistry