@hybrd/xmtp 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +10 -10
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/jwt.ts +4 -4
package/dist/index.js
CHANGED
|
@@ -3272,16 +3272,16 @@ function getValidatedPayload(c) {
|
|
|
3272
3272
|
return validateXMTPToolsToken(token);
|
|
3273
3273
|
}
|
|
3274
3274
|
var JWT_SECRET = (() => {
|
|
3275
|
-
const secret = process.env.
|
|
3275
|
+
const secret = process.env.XMTP_ENCRYPTION_KEY;
|
|
3276
3276
|
const nodeEnv = process.env.NODE_ENV || "development";
|
|
3277
3277
|
if (nodeEnv === "production" && !secret) {
|
|
3278
3278
|
throw new Error(
|
|
3279
|
-
"
|
|
3279
|
+
"XMTP_ENCRYPTION_KEY environment variable is required in production. Generate a secure random secret for JWT token signing."
|
|
3280
3280
|
);
|
|
3281
3281
|
}
|
|
3282
3282
|
if (!secret) {
|
|
3283
3283
|
console.warn(
|
|
3284
|
-
"\u26A0\uFE0F [SECURITY] Using fallback JWT secret for development. Set
|
|
3284
|
+
"\u26A0\uFE0F [SECURITY] Using fallback JWT secret for development. Set XMTP_ENCRYPTION_KEY environment variable for production."
|
|
3285
3285
|
);
|
|
3286
3286
|
return "fallback-secret-for-dev-only";
|
|
3287
3287
|
}
|