Skip to content

Commit ab3bb94

Browse files
committed
Adjust arbitrary keys to custom claims field to prevent conflicts
1 parent 23188ec commit ab3bb94

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/server/auth/types.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ export interface AuthInfo {
2323
expiresAt?: number;
2424

2525
/**
26-
* Additional arbitrary properties that may be included.
26+
* Additional custom claims associated with the token.
27+
* This field should be used for any additional data that needs to be attached to the auth info.
28+
* Using this field instead of arbitrary keys ensures compatibility with future interface changes.
2729
*/
28-
[key: string]: unknown;
30+
customClaims?: Record<string, unknown>;
2931
}

0 commit comments

Comments
 (0)