@thzero/library_client_firebase 0.16.6 → 0.16.7
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/boot/starter.js +63 -62
- package/package.json +3 -3
package/boot/starter.js
CHANGED
|
@@ -10,7 +10,7 @@ import config from 'local-config';
|
|
|
10
10
|
|
|
11
11
|
// export default async ({
|
|
12
12
|
export default ({
|
|
13
|
-
|
|
13
|
+
setup
|
|
14
14
|
}) => {
|
|
15
15
|
const configExternal = config.external;
|
|
16
16
|
if (!configExternal)
|
|
@@ -90,67 +90,68 @@ export default ({
|
|
|
90
90
|
// }
|
|
91
91
|
// })
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
93
|
+
setup();
|
|
94
|
+
// router.beforeResolve((to, from, next) => {
|
|
95
|
+
// const auth = GlobalUtility.$injector.getService(LibraryConstants.InjectorKeys.SERVICE_AUTH);
|
|
96
|
+
// const logger = GlobalUtility.$injector.getService(LibraryConstants.InjectorKeys.SERVICE_LOGGER);
|
|
97
|
+
// logger.debug('router.beforeResolve', to);
|
|
98
|
+
// if (to.matched.some(record => record.meta.requiresAuth)) {
|
|
99
|
+
// const isLoggedIn = auth.isAuthenticated;
|
|
100
|
+
// if (!isLoggedIn) {
|
|
101
|
+
// // GlobalUtility.$EventBus.on('auth-refresh', (user) => {
|
|
102
|
+
// // logger.debug('auth-refresh', user)
|
|
103
|
+
// // next()
|
|
104
|
+
// // })
|
|
105
|
+
// // return
|
|
106
|
+
// GlobalUtility.$navRouter.push('/', null, () => {
|
|
107
|
+
// // GlobalUtility.$navRouter.push('/')
|
|
108
|
+
// // window.location.href = '/'
|
|
109
|
+
// });
|
|
110
|
+
// return;
|
|
111
|
+
// }
|
|
112
|
+
|
|
113
|
+
// next();
|
|
114
|
+
|
|
115
|
+
// // eslint-disable-next-line no-unused-vars
|
|
116
|
+
// // auth.isAuthenticated().then(async (data) => {
|
|
117
|
+
// // logger.debug('router.beforeResolve.matched')
|
|
118
|
+
|
|
119
|
+
// // //const isLoggedIn = GlobalUtility.$store.state.user.isLoggedIn
|
|
120
|
+
// // const isLoggedIn = await auth.isAuthenticated()
|
|
121
|
+
// // if (!isLoggedIn) {
|
|
122
|
+
// // GlobalUtility.$EventBus.on('auth-refresh', (user) => {
|
|
123
|
+
// // logger.debug('auth-refresh', user)
|
|
124
|
+
// // next()
|
|
125
|
+
// // })
|
|
126
|
+
// // return
|
|
127
|
+
// // }
|
|
128
|
+
|
|
129
|
+
// // // if (GlobalUtility.$store.state.user.token) {
|
|
130
|
+
// // // next()
|
|
131
|
+
// // // return
|
|
132
|
+
// // // }
|
|
133
|
+
|
|
134
|
+
// // // GlobalUtility.$EventBus.on('auth-refresh', (user) => {
|
|
135
|
+
// // // logger.debug('auth-refresh', user)
|
|
136
|
+
// // // next()
|
|
137
|
+
// // // })
|
|
138
|
+
|
|
139
|
+
// // next()
|
|
140
|
+
// // }).catch((e) => {
|
|
141
|
+
// // logger.error('router.beforeResolve.error', e)
|
|
142
|
+
// // logger.error('to', to)
|
|
143
|
+
// // logger.error('from', from)
|
|
144
|
+
// // if (to.name == 'auth') {
|
|
145
|
+
// // next()
|
|
146
|
+
// // return
|
|
147
|
+
// // }
|
|
148
|
+
// // next({ path: '/auth' })
|
|
149
|
+
// // })
|
|
150
|
+
|
|
151
|
+
// return;
|
|
152
|
+
// }
|
|
153
|
+
// next();
|
|
154
|
+
// });
|
|
154
155
|
|
|
155
156
|
return promiseAuth;
|
|
156
157
|
};
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thzero/library_client_firebase",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.7",
|
|
4
4
|
"version_major": 0,
|
|
5
5
|
"version_minor": 16,
|
|
6
|
-
"version_patch":
|
|
7
|
-
"version_date": "
|
|
6
|
+
"version_patch": 7,
|
|
7
|
+
"version_date": "12/06/2022",
|
|
8
8
|
"author": "thZero",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|