@hellocoop/express 1.3.0 → 1.4.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/handlers/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAIzD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAO/C,MAAM,MAAM,WAAW,GACnB,MAAM,GAAG;IACL,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB,CAAA;AAEL,eAAO,MAAM,UAAU,QAAwB,OAAO,OAAO,QAAQ,kBAEpE,CAAA;AAED,eAAO,MAAM,SAAS,QAAyB,QAAQ,kBAEtD,CAAA;AAED,eAAO,MAAM,iBAAiB,QAAyB,OAAO,OAAO,QAAQ,QAAQ,YAAY,kBAYhG,CAAA;AAED,eAAO,MAAM,UAAU,QAAyB,OAAO,OAAO,QAAQ,eAAe,WAAW,KACtF,QAAQ,IAAI,GAAG,IAAI,CAc5B,CAAA"}
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/handlers/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAIzD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAO/C,MAAM,MAAM,WAAW,GACnB,MAAM,GAAG;IACL,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB,CAAA;AAEL,eAAO,MAAM,UAAU,QAAwB,OAAO,OAAO,QAAQ,kBAKpE,CAAA;AAED,eAAO,MAAM,SAAS,QAAyB,QAAQ,kBAEtD,CAAA;AAED,eAAO,MAAM,iBAAiB,QAAyB,OAAO,OAAO,QAAQ,QAAQ,YAAY,kBAYhG,CAAA;AAED,eAAO,MAAM,UAAU,QAAyB,OAAO,OAAO,QAAQ,eAAe,WAAW,KACtF,QAAQ,IAAI,GAAG,IAAI,CAc5B,CAAA"}
@@ -4,6 +4,9 @@ exports.updateAuth = exports.setAuthMiddleware = exports.clearAuth = exports.han
4
4
  const auth_1 = require("../lib/auth");
5
5
  const auth_2 = require("../lib/auth");
6
6
  const handleAuth = async function (req, res) {
7
+ res.setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, proxy-revalidate');
8
+ res.setHeader('Pragma', 'no-cache');
9
+ res.setHeader('Expires', '0');
7
10
  res.json(await req.getAuth());
8
11
  };
9
12
  exports.handleAuth = handleAuth;
package/dist/lib/auth.js CHANGED
@@ -44,7 +44,7 @@ const clearAuthCookie = async (res) => {
44
44
  exports.clearAuthCookie = clearAuthCookie;
45
45
  const getAuthfromCookies = async function (req, res) {
46
46
  const cookies = (0, cookie_1.parse)(req.headers.cookie || '');
47
- if (cookies[oidcName]) // clear OIDC cookie it still there
47
+ if (cookies[oidcName]) // clear OIDC cookie if still there
48
48
  (0, oidc_1.clearOidcCookie)(res);
49
49
  const laxAuthCookie = cookies[laxAuthName];
50
50
  if (laxAuthCookie) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hellocoop/express",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Express SDK for Hellō https://hello.dev",
5
5
  "repository": {
6
6
  "type": "git",