@rebasepro/server 0.13.0 → 0.13.1-canary.gcd6689e
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/dist/{admin_block-CcSGdH7M.js → admin_block-EmIHae6X.js} +2 -1
- package/dist/admin_block-EmIHae6X.js.map +1 -0
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/jwt.d.ts +12 -0
- package/dist/{auth-CuC9M2x6.js → auth-ByFdJcuM.js} +7 -5
- package/dist/auth-ByFdJcuM.js.map +1 -0
- package/dist/index.es.js +8 -7
- package/dist/index.es.js.map +1 -1
- package/dist/{jwt-DD6EtpGj.js → jwt-CzeviDcB.js} +17 -2
- package/dist/{jwt-DD6EtpGj.js.map → jwt-CzeviDcB.js.map} +1 -1
- package/dist/{schema-editor-routes-CbF20Mf1.js → schema-editor-routes-COEkzWEa.js} +2 -2
- package/dist/{schema-editor-routes-CbF20Mf1.js.map → schema-editor-routes-COEkzWEa.js.map} +1 -1
- package/dist/src-Cum9kox5.js.map +1 -1
- package/dist/utils/logging.d.ts +0 -4
- package/package.json +5 -5
- package/dist/admin_block-CcSGdH7M.js.map +0 -1
- package/dist/auth-CuC9M2x6.js.map +0 -1
|
@@ -4159,6 +4159,7 @@ var jwt_exports = /* @__PURE__ */ __exportAll({
|
|
|
4159
4159
|
getRefreshTokenExpiry: () => getRefreshTokenExpiry,
|
|
4160
4160
|
getRefreshTokenTtlMs: () => getRefreshTokenTtlMs,
|
|
4161
4161
|
hashRefreshToken: () => hashRefreshToken,
|
|
4162
|
+
isJwtConfigured: () => isJwtConfigured,
|
|
4162
4163
|
verifyAccessToken: () => verifyAccessToken,
|
|
4163
4164
|
verifyDownloadToken: () => verifyDownloadToken
|
|
4164
4165
|
});
|
|
@@ -4202,6 +4203,20 @@ function configureJwt(config) {
|
|
|
4202
4203
|
};
|
|
4203
4204
|
}
|
|
4204
4205
|
/**
|
|
4206
|
+
* Has this server been given a JWT secret?
|
|
4207
|
+
*
|
|
4208
|
+
* False on every backend that authenticates through an adapter — Firebase,
|
|
4209
|
+
* Clerk, anything with its own tokens — because nothing calls
|
|
4210
|
+
* {@link configureJwt} there. Signing paths still throw when it is false, since
|
|
4211
|
+
* asking for a token from a server that cannot mint one is a mistake worth
|
|
4212
|
+
* hearing about. Paths whose contract is *"tolerate the absence of auth"* must
|
|
4213
|
+
* ask first: `optionalAuth` crashing a request because this backend does not do
|
|
4214
|
+
* JWT is a 500 on a route that had already decided anonymous was acceptable.
|
|
4215
|
+
*/
|
|
4216
|
+
function isJwtConfigured() {
|
|
4217
|
+
return Boolean(jwtConfig.secret);
|
|
4218
|
+
}
|
|
4219
|
+
/**
|
|
4205
4220
|
* Generate an access token (short-lived, 1 hour by default)
|
|
4206
4221
|
*/
|
|
4207
4222
|
function generateAccessToken(uid, roles, aal = "aal1", customClaims) {
|
|
@@ -4359,6 +4374,6 @@ function verifyDownloadToken(token) {
|
|
|
4359
4374
|
}
|
|
4360
4375
|
}
|
|
4361
4376
|
//#endregion
|
|
4362
|
-
export { generateRefreshToken as a, getRefreshTokenTtlMs as c,
|
|
4377
|
+
export { generateRefreshToken as a, getRefreshTokenTtlMs as c, jwt_exports as d, verifyAccessToken as f, generateDownloadToken as i, hashRefreshToken as l, require_jsonwebtoken as m, configureJwt as n, getAccessTokenExpiry as o, verifyDownloadToken as p, generateAccessToken as r, getRefreshTokenExpiry as s, MAX_COOKIE_AGE_MS as t, isJwtConfigured as u };
|
|
4363
4378
|
|
|
4364
|
-
//# sourceMappingURL=jwt-
|
|
4379
|
+
//# sourceMappingURL=jwt-CzeviDcB.js.map
|