@tstdl/base 0.93.59 → 0.93.61
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.
|
@@ -26,7 +26,6 @@ export declare class AuthenticationClientService<AdditionalTokenPayload extends
|
|
|
26
26
|
private readonly logger;
|
|
27
27
|
private readonly disposeToken;
|
|
28
28
|
private clockOffset;
|
|
29
|
-
private get localStorage();
|
|
30
29
|
/**
|
|
31
30
|
* Observable for authentication errors.
|
|
32
31
|
* Emits when a refresh fails.
|
|
@@ -9,6 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { Subject, filter, firstValueFrom, race, timer } from 'rxjs';
|
|
11
11
|
import { CancellationToken } from '../../cancellation/token.js';
|
|
12
|
+
import { isNode } from '../../environment.js';
|
|
12
13
|
import { BadRequestError } from '../../errors/bad-request.error.js';
|
|
13
14
|
import { ForbiddenError } from '../../errors/forbidden.error.js';
|
|
14
15
|
import { InvalidTokenError } from '../../errors/invalid-token.error.js';
|
|
@@ -43,6 +44,7 @@ const unrecoverableErrors = [
|
|
|
43
44
|
NotSupportedError,
|
|
44
45
|
UnauthorizedError,
|
|
45
46
|
];
|
|
47
|
+
const localStorage = isNode ? undefined : globalThis.localStorage;
|
|
46
48
|
/**
|
|
47
49
|
* Handles authentication on client side.
|
|
48
50
|
*
|
|
@@ -67,9 +69,6 @@ let AuthenticationClientService = class AuthenticationClientService {
|
|
|
67
69
|
logger = inject(Logger, 'AuthenticationService');
|
|
68
70
|
disposeToken = new CancellationToken();
|
|
69
71
|
clockOffset = 0;
|
|
70
|
-
get localStorage() {
|
|
71
|
-
return globalThis.localStorage;
|
|
72
|
-
}
|
|
73
72
|
/**
|
|
74
73
|
* Observable for authentication errors.
|
|
75
74
|
* Emits when a refresh fails.
|