@maximemrf/adonisjs-jwt 0.0.17 → 0.0.18

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/build/src/jwt.js +3 -2
  2. package/package.json +1 -1
package/build/src/jwt.js CHANGED
@@ -69,8 +69,9 @@ export class JwtGuard {
69
69
  * If cookies are enabled, then read the token from the cookies
70
70
  */
71
71
  if (cookieHeader) {
72
- ;
73
- [, token] = cookieHeader.split('=');
72
+ token = (this.#ctx.request.request.headers.cookie.match(/token=(.*?)(;|$)/) || [])[1];
73
+ console.log('cookietoken|', token);
74
+ //;[, token] = cookieHeader!.split('=')
74
75
  }
75
76
  /**
76
77
  * If token is missing on cookies, then try to read it from the header authorization
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maximemrf/adonisjs-jwt",
3
3
  "description": "",
4
- "version": "0.0.17",
4
+ "version": "0.0.18",
5
5
  "engines": {
6
6
  "node": ">=20.6.0"
7
7
  },