auth-vir 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.
package/dist/cookie.js CHANGED
@@ -71,7 +71,7 @@ export async function extractCookieJwt(rawCookie, jwtParams, cookieName = 'auth'
71
71
  if (!auth) {
72
72
  return undefined;
73
73
  }
74
- const rawJwt = auth.replace('auth=', '').replace(';', '');
74
+ const rawJwt = auth.replace(`${cookieName}=`, '').replace(';', '');
75
75
  const jwt = await parseUserJwt(rawJwt, jwtParams);
76
76
  return jwt;
77
77
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auth-vir",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Auth made easy and secure via JWT cookies, CSRF tokens, and password hashing helpers.",
5
5
  "keywords": [
6
6
  "auth",
package/src/cookie.ts CHANGED
@@ -132,7 +132,7 @@ export async function extractCookieJwt(
132
132
  return undefined;
133
133
  }
134
134
 
135
- const rawJwt = auth.replace('auth=', '').replace(';', '');
135
+ const rawJwt = auth.replace(`${cookieName}=`, '').replace(';', '');
136
136
 
137
137
  const jwt = await parseUserJwt(rawJwt, jwtParams);
138
138