@cloudron/tegel 1.2.0 → 1.2.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.
Files changed (2) hide show
  1. package/index.js +7 -1
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -7,7 +7,7 @@ import { lastMile, HttpError } from '@cloudron/connect-lastmile';
7
7
  import * as oidc from './src/oidc.js';
8
8
 
9
9
  export async function createExpressApp({ oidcConfig, jsonBodySizeLimit = '25mb', skipLastMile = false }) {
10
- await oidc.initOIDC(oidcConfig);
10
+ if (oidcConfig) await oidc.initOIDC(oidcConfig);
11
11
 
12
12
  const app = express();
13
13
 
@@ -130,6 +130,12 @@ export function logout(redirectTo) {
130
130
 
131
131
  req.session.destroy((error) => {
132
132
  if (error) console.error('Logout error:', error);
133
+ res.clearCookie('connect.sid', {
134
+ path: '/',
135
+ httpOnly: true,
136
+ secure: process.env.NODE_ENV === 'production',
137
+ sameSite: 'lax'
138
+ });
133
139
  res.redirect(redirectUri + redirectTo);
134
140
  });
135
141
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudron/tegel",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "",
5
5
  "license": "GPL-2.0",
6
6
  "author": "Cloudron Developers",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "@eslint/js": "^10.0.1",
23
- "eslint": "^10.0.2",
23
+ "eslint": "^10.0.3",
24
24
  "globals": "^17.4.0"
25
25
  }
26
26
  }