@raketa-cloud/admin 0.0.87 → 0.0.88

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raketa-cloud/admin",
3
- "version": "0.0.87",
3
+ "version": "0.0.88",
4
4
  "main": "src/index.js",
5
5
  "scripts": {
6
6
  "dev": "npx tailwindcss -i ./src/styles/application.css -o ../../apps/admin/static/application.css --watch",
@@ -28,8 +28,9 @@ function extractToken(text) {
28
28
  const encrypted = Buffer.from(text, "base64").toString("ascii");
29
29
  const signed = simpleCipher.decrypt(encrypted);
30
30
  const [hash, token, timestamp] = signed.split(DELIMITER);
31
+ const tDate = new Date(Number.parseInt(timestamp, 10));
31
32
 
32
- if (new Date(timestamp) > new Date()) {
33
+ if (tDate < new Date()) {
33
34
  return null;
34
35
  }
35
36
 
@@ -137,6 +138,10 @@ const setupAuthentication = (app, config) => {
137
138
  return c.redirect("/login");
138
139
  }
139
140
 
141
+ const ot = obfuscateToken(token);
142
+
143
+ console.log({ ot });
144
+
140
145
  return c.redirect(
141
146
  [
142
147
  config.remoteConfig.remoteLogin,