@redmix/auth-dbauth-middleware 0.0.1 → 9.0.0-canary.518

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/cjs/index.js CHANGED
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(index_exports);
35
35
  var import_auth_dbauth_api = __toESM(require("@redmix/auth-dbauth-api"), 1);
36
36
  var import_middleware = require("@redmix/web/middleware");
37
37
  var import_defaultGetRoles = require("./defaultGetRoles.js");
38
- const { dbAuthSession, cookieName: cookieNameCreator } = import_auth_dbauth_api.default;
38
+ const { dbAuthSession, generateCookieName } = import_auth_dbauth_api.default;
39
39
  const initDbAuthMiddleware = ({
40
40
  dbAuthHandler,
41
41
  getCurrentUser,
@@ -100,7 +100,7 @@ const initDbAuthMiddleware = ({
100
100
  });
101
101
  } else {
102
102
  req.serverAuthState.clear();
103
- res.cookies.unset(cookieNameCreator(cookieName));
103
+ res.cookies.unset(generateCookieName(cookieName));
104
104
  res.cookies.unset("auth-provider");
105
105
  }
106
106
  return res;
@@ -116,7 +116,7 @@ async function validateSession({
116
116
  try {
117
117
  decryptedSession = dbAuthSession(
118
118
  req,
119
- cookieNameCreator(cookieName)
119
+ generateCookieName(cookieName)
120
120
  );
121
121
  } catch (e) {
122
122
  if (process.env.NODE_ENV === "development") {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import dbAuthApi from "@redmix/auth-dbauth-api";
2
- const { dbAuthSession, cookieName: cookieNameCreator } = dbAuthApi;
2
+ const { dbAuthSession, generateCookieName } = dbAuthApi;
3
3
  import { MiddlewareResponse } from "@redmix/web/middleware";
4
4
  import { defaultGetRoles } from "./defaultGetRoles.js";
5
5
  const initDbAuthMiddleware = ({
@@ -66,7 +66,7 @@ const initDbAuthMiddleware = ({
66
66
  });
67
67
  } else {
68
68
  req.serverAuthState.clear();
69
- res.cookies.unset(cookieNameCreator(cookieName));
69
+ res.cookies.unset(generateCookieName(cookieName));
70
70
  res.cookies.unset("auth-provider");
71
71
  }
72
72
  return res;
@@ -82,7 +82,7 @@ async function validateSession({
82
82
  try {
83
83
  decryptedSession = dbAuthSession(
84
84
  req,
85
- cookieNameCreator(cookieName)
85
+ generateCookieName(cookieName)
86
86
  );
87
87
  } catch (e) {
88
88
  if (process.env.NODE_ENV === "development") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redmix/auth-dbauth-middleware",
3
- "version": "0.0.1",
3
+ "version": "9.0.0-canary.518+f9439a7a6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/redmix-run/redmix.git",
@@ -37,14 +37,14 @@
37
37
  "test:watch": "vitest watch"
38
38
  },
39
39
  "dependencies": {
40
- "@redmix/auth-dbauth-api": "0.0.1",
41
- "@redmix/web": "0.0.1"
40
+ "@redmix/auth-dbauth-api": "9.0.0-canary.518",
41
+ "@redmix/web": "9.0.0-canary.518"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@arethetypeswrong/cli": "0.16.4",
45
- "@redmix/api": "0.0.1",
46
- "@redmix/framework-tools": "0.0.1",
47
- "@redmix/graphql-server": "0.0.1",
45
+ "@redmix/api": "9.0.0-canary.518",
46
+ "@redmix/framework-tools": "9.0.0-canary.518",
47
+ "@redmix/graphql-server": "9.0.0-canary.518",
48
48
  "@types/aws-lambda": "8.10.145",
49
49
  "concurrently": "8.2.2",
50
50
  "publint": "0.3.11",
@@ -53,8 +53,5 @@
53
53
  "typescript": "5.6.2",
54
54
  "vitest": "2.1.9"
55
55
  },
56
- "publishConfig": {
57
- "access": "public"
58
- },
59
- "gitHead": "25a2481ac394049b7c864eda26381814a0124a79"
56
+ "gitHead": "f9439a7a6478e5c522bda13a779f323b2b714f3a"
60
57
  }