@thzero/library_client_firebase 0.15.12 → 0.15.15
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/package.json +28 -30
- package/service/index.js +6 -6
package/package.json
CHANGED
|
@@ -1,31 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@thzero/library_client_firebase",
|
|
3
|
-
"version": "0.15.
|
|
4
|
-
"version_major": 0,
|
|
5
|
-
"version_minor": 15,
|
|
6
|
-
"version_patch":
|
|
7
|
-
"version_date": "
|
|
8
|
-
"author": "thZero",
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/thzero/library_client_firebase.git"
|
|
13
|
-
},
|
|
14
|
-
"bugs": {
|
|
15
|
-
"url": "https://github.com/thzero/library_client_firebase/issues"
|
|
16
|
-
},
|
|
17
|
-
"homepage": "https://github.com/thzero/library_client_firebase#readme",
|
|
18
|
-
"scripts": {
|
|
19
|
-
"cli-update": "
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"@thzero/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"@thzero/library_cli": "^0.15"
|
|
30
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@thzero/library_client_firebase",
|
|
3
|
+
"version": "0.15.15",
|
|
4
|
+
"version_major": 0,
|
|
5
|
+
"version_minor": 15,
|
|
6
|
+
"version_patch": 15,
|
|
7
|
+
"version_date": "05/26/2022",
|
|
8
|
+
"author": "thZero",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/thzero/library_client_firebase.git"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/thzero/library_client_firebase/issues"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/thzero/library_client_firebase#readme",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"cli-update": "library-cli --updateversion --pi",
|
|
20
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"firebase": "^9.8.1"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"@thzero/library_client": "^0.15",
|
|
27
|
+
"@thzero/library_common": "^0.15"
|
|
28
|
+
}
|
|
31
29
|
}
|
package/service/index.js
CHANGED
|
@@ -181,7 +181,7 @@ class FirebaseAuthService extends UserAuthService {
|
|
|
181
181
|
forceRefresh = forceRefresh !== null ? forceRefresh : false;
|
|
182
182
|
|
|
183
183
|
try {
|
|
184
|
-
this._logger.debug('FirebaseAuthService', '
|
|
184
|
+
this._logger.debug('FirebaseAuthService', 'refreshToken', 'user', user, correlationId);
|
|
185
185
|
if (!user) {
|
|
186
186
|
await this._serviceUser.setTokenResult(correlationId, null);
|
|
187
187
|
await this._serviceUser.setClaims(correlationId, null);
|
|
@@ -190,9 +190,9 @@ class FirebaseAuthService extends UserAuthService {
|
|
|
190
190
|
return;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
this._logger.debug('FirebaseAuthService', '
|
|
193
|
+
this._logger.debug('FirebaseAuthService', 'refreshToken', 'forceRefresh', forceRefresh, correlationId);
|
|
194
194
|
const currentUser = await getAuth().currentUser;
|
|
195
|
-
this._logger.debug('FirebaseAuthService', '
|
|
195
|
+
this._logger.debug('FirebaseAuthService', 'refreshToken', 'currentUser', currentUser, correlationId);
|
|
196
196
|
if (!currentUser)
|
|
197
197
|
return;
|
|
198
198
|
|
|
@@ -201,9 +201,9 @@ class FirebaseAuthService extends UserAuthService {
|
|
|
201
201
|
await this._serviceUser.setTokenResult(correlationId, tokenResult);
|
|
202
202
|
const token = tokenResult.token;
|
|
203
203
|
let claims = token != null ? tokenResult.claims : null;
|
|
204
|
-
this._logger.debug('FirebaseAuthService', '
|
|
204
|
+
this._logger.debug('FirebaseAuthService', 'refreshToken', 'claims', claims, correlationId);
|
|
205
205
|
claims = claims != null ? claims.custom : null;
|
|
206
|
-
this._logger.debug('FirebaseAuthService', '
|
|
206
|
+
this._logger.debug('FirebaseAuthService', 'refreshToken', 'claims.custom', claims, correlationId);
|
|
207
207
|
await this._serviceUser.setClaims(correlationId, claims);
|
|
208
208
|
|
|
209
209
|
this.announceToken(correlationId, user, token);
|
|
@@ -236,7 +236,7 @@ class FirebaseAuthService extends UserAuthService {
|
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
catch (err) {
|
|
239
|
-
this._logger.exception('FirebaseAuthService', '
|
|
239
|
+
this._logger.exception('FirebaseAuthService', 'refreshToken', err, correlationId);
|
|
240
240
|
throw err;
|
|
241
241
|
}
|
|
242
242
|
}
|