@thzero/library_client_firebase 0.17.18 → 0.17.19
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 +2 -2
- package/service/index.js +11 -11
package/package.json
CHANGED
package/service/index.js
CHANGED
|
@@ -198,14 +198,14 @@ class FirebaseAuthService extends UserAuthService {
|
|
|
198
198
|
this._logger.info2('requiresAuth');
|
|
199
199
|
let isLoggedIn = await this.isAuthenticated();
|
|
200
200
|
this._logger.info2('authorization.isLoggedIn', isLoggedIn);
|
|
201
|
-
console.log('authorization.isLoggedIn', isLoggedIn);
|
|
201
|
+
// console.log('authorization.isLoggedIn', isLoggedIn);
|
|
202
202
|
if (!isLoggedIn) {
|
|
203
203
|
// Briefly wait for authentication to settle...
|
|
204
204
|
let i = 0;
|
|
205
205
|
while (await this.sleep(150)) {
|
|
206
206
|
if (this._serviceStore.userAuthCompleted) {
|
|
207
207
|
this._logger.info2('authorization.userAuthCompleted', userAuthCompleted);
|
|
208
|
-
console.log('authorization.userAuthCompleted', userAuthCompleted);
|
|
208
|
+
// console.log('authorization.userAuthCompleted', userAuthCompleted);
|
|
209
209
|
break;
|
|
210
210
|
}
|
|
211
211
|
i++;
|
|
@@ -221,10 +221,10 @@ class FirebaseAuthService extends UserAuthService {
|
|
|
221
221
|
isLoggedIn = isLoggedInAuthCompleted;
|
|
222
222
|
}
|
|
223
223
|
this._logger.info2('authorization.isLoggedIn.final', isLoggedIn);
|
|
224
|
-
console.log('authorization.isLoggedIn.final', isLoggedIn);
|
|
224
|
+
// console.log('authorization.isLoggedIn.final', isLoggedIn);
|
|
225
225
|
if (!isLoggedIn) {
|
|
226
226
|
this._logger.warn2('authorization.isLoggedIn - failed');
|
|
227
|
-
console.log('authorization.isLoggedIn - failed');
|
|
227
|
+
// console.log('authorization.isLoggedIn - failed');
|
|
228
228
|
// LibraryClientUtility.$EventBus.on('auth-refresh', (user) => {
|
|
229
229
|
// this._logger.debug('auth-refresh', user)
|
|
230
230
|
// this._logger.debug('middleware', 'auth-refresh', null, user, correlationId);
|
|
@@ -235,19 +235,19 @@ class FirebaseAuthService extends UserAuthService {
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
this._logger.info2('authorization.isLoggedIn - success');
|
|
238
|
-
console.log('authorization.isLoggedIn - success');
|
|
238
|
+
// console.log('authorization.isLoggedIn - success');
|
|
239
239
|
|
|
240
240
|
const user = this._serviceUser.user;
|
|
241
241
|
let success = true;
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
242
|
+
// console.log('authorization.requiresAuthRoles', requiresAuthRoles);
|
|
243
|
+
this._logger.debug('FirebaseAuthService', 'resolveAuthorization', 'requiresAuthRoles', requiresAuthRoles);
|
|
244
|
+
// console.log('authorization.requiresAuthLogical', requiresAuthLogical);
|
|
245
|
+
this._logger.debug('FirebaseAuthService', 'resolveAuthorization', 'requiresAuthLogical', requiresAuthLogical);
|
|
246
246
|
|
|
247
247
|
if (requiresAuthRoles) {
|
|
248
248
|
success = await this._serviceSecurity.authorizationCheckRoles(correlationId, user, requiresAuthRoles, requiresAuthLogical);
|
|
249
249
|
this._logger.info2('authorization.roles.success', success);
|
|
250
|
-
console.log('authorization.roles.success', success);
|
|
250
|
+
// console.log('authorization.roles.success', success);
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
this._logger.debug('FirebaseAuthService', 'resolveAuthorization', 'success', success, correlationId);
|
|
@@ -263,7 +263,7 @@ class FirebaseAuthService extends UserAuthService {
|
|
|
263
263
|
return false;
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
this._logger.debug('FirebaseAuthService', 'resolveAuthorization', 'roles
|
|
266
|
+
this._logger.debug('FirebaseAuthService', 'resolveAuthorization', 'roles.success', true, correlationId);
|
|
267
267
|
// console.log('authorization.roles - success');
|
|
268
268
|
|
|
269
269
|
return true;
|