@maximemrf/adonisjs-jwt 0.0.18 → 0.0.19

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 -1
  2. package/package.json +1 -1
package/build/src/jwt.js CHANGED
@@ -69,7 +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
- token = (this.#ctx.request.request.headers.cookie.match(/token=(.*?)(;|$)/) || [])[1];
72
+ token = this.#ctx.request.cookie('token')
73
+ ? this.#ctx.request.cookie('token')
74
+ : (this.#ctx.request.request.headers.cookie.match(/token=(.*?)(;|$)/) || [])[1];
73
75
  console.log('cookietoken|', token);
74
76
  //;[, token] = cookieHeader!.split('=')
75
77
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maximemrf/adonisjs-jwt",
3
3
  "description": "",
4
- "version": "0.0.18",
4
+ "version": "0.0.19",
5
5
  "engines": {
6
6
  "node": ">=20.6.0"
7
7
  },