auth-vir 2.3.2 → 2.3.3

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.
@@ -1,4 +1,4 @@
1
- import { type AnyObject, type JsonCompatibleObject, type MaybePromise, type PartialWithUndefined, type RequiredAndNotNull } from '@augment-vir/common';
1
+ import { type AnyObject, type JsonCompatibleObject, type MaybePromise, type PartialWithUndefined } from '@augment-vir/common';
2
2
  import { type AnyDuration } from 'date-vir';
3
3
  import { type IncomingHttpHeaders, type OutgoingHttpHeaders } from 'node:http';
4
4
  import { type EmptyObject, type RequireExactlyOne, type RequireOneOrNone } from 'type-fest';
@@ -165,7 +165,7 @@ export declare class BackendAuthClient<DatabaseUser extends AnyObject, UserId ex
165
165
  userId: UserId;
166
166
  requestHeaders: IncomingHttpHeaders;
167
167
  isSignUpCookie: boolean;
168
- }): Promise<Pick<RequiredAndNotNull<OutgoingHttpHeaders>, 'set-cookie'> & Record<CsrfHeaderName, string>>;
168
+ }): Promise<OutgoingHttpHeaders>;
169
169
  /** Combines `.getInsecureUser()` and `.getSecureUser()` into one method. */
170
170
  getInsecureOrSecureUser(params: {
171
171
  requestHeaders: IncomingHttpHeaders;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auth-vir",
3
- "version": "2.3.2",
3
+ "version": "2.3.3",
4
4
  "description": "Auth made easy and secure via JWT cookies, CSRF tokens, and password hashing helpers.",
5
5
  "keywords": [
6
6
  "auth",
@@ -4,7 +4,6 @@ import {
4
4
  type JsonCompatibleObject,
5
5
  type MaybePromise,
6
6
  type PartialWithUndefined,
7
- type RequiredAndNotNull,
8
7
  } from '@augment-vir/common';
9
8
  import {calculateRelativeDate, getNowInUtcTimezone, isDateAfter, type AnyDuration} from 'date-vir';
10
9
  import {type IncomingHttpHeaders, type OutgoingHttpHeaders} from 'node:http';
@@ -426,9 +425,7 @@ export class BackendAuthClient<
426
425
  userId: UserId;
427
426
  requestHeaders: IncomingHttpHeaders;
428
427
  isSignUpCookie: boolean;
429
- }): Promise<
430
- Pick<RequiredAndNotNull<OutgoingHttpHeaders>, 'set-cookie'> & Record<CsrfHeaderName, string>
431
- > {
428
+ }): Promise<OutgoingHttpHeaders> {
432
429
  const oppositeCookieName = isSignUpCookie ? AuthCookieName.Auth : AuthCookieName.SignUp;
433
430
  const hasExistingOppositeCookie = requestHeaders.cookie?.includes(`${oppositeCookieName}=`);
434
431