Skip to content

Commit abfb399

Browse files
committed
remove restriction for max auth token lifetime
1 parent d167921 commit abfb399

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

packages/sdk/src/auth/token-provider.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { AccountAddress, Token } from './auth.interface';
2-
import { IllegalArgumentError } from '../sdk/errors';
32
import { TokenStore } from './token-store';
43
import type { TokenParser } from './token-parser';
54
import type { TokenValidator } from './token-validator';
@@ -9,7 +8,6 @@ import type { DataServiceWalletsApiClientV1 } from '../dialect-cloud-api/data-se
98
import type { WalletCreation } from '../sdk/sdk.interface';
109

1110
export const DEFAULT_TOKEN_LIFETIME_SECONDS = 24 * 60 * 60; // 24 hours
12-
export const MAX_TOKEN_LIFETIME_SECONDS = 3 * 30 * 24 * 60 * 60; // 3 months
1311

1412
export abstract class TokenProvider {
1513
static create(
@@ -42,11 +40,6 @@ export class DefaultTokenProvider extends TokenProvider {
4240
private readonly ttlSeconds: number,
4341
private readonly tokenGenerator: TokenGenerator,
4442
) {
45-
if (ttlSeconds > MAX_TOKEN_LIFETIME_SECONDS) {
46-
throw new IllegalArgumentError(
47-
`Token TTL ${ttlSeconds} must be <= max ${MAX_TOKEN_LIFETIME_SECONDS}`,
48-
);
49-
}
5043
super();
5144
}
5245

0 commit comments

Comments
 (0)