@yuuvis/client-core 2.20.0 → 2.20.1
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.
|
@@ -3119,16 +3119,20 @@ class AuthService {
|
|
|
3119
3119
|
*/
|
|
3120
3120
|
setInitialRequestUri() {
|
|
3121
3121
|
const ignore = ['/', '/index.html'];
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3122
|
+
const baseHref = Utils.getBaseHref();
|
|
3123
|
+
// Check only the pathname against the ignore list so that auth callback
|
|
3124
|
+
// query params (e.g. ?session_state=…) don't bypass the check.
|
|
3125
|
+
let path = location.pathname.replace(baseHref, '');
|
|
3126
|
+
path = !path.startsWith('/') ? `/${path}` : path;
|
|
3127
|
+
if (!ignore.includes(path)) {
|
|
3128
|
+
let uri = `${location.pathname}${location.search}`.replace(baseHref, '');
|
|
3129
|
+
uri = !uri.startsWith('/') ? `/${uri}` : uri;
|
|
3130
|
+
return this.#appCache.setItem(this.#INITIAL_REQUEST_STORAGE_KEY, {
|
|
3127
3131
|
uri: uri,
|
|
3128
3132
|
timestamp: Date.now()
|
|
3129
|
-
})
|
|
3130
|
-
.subscribe();
|
|
3133
|
+
});
|
|
3131
3134
|
}
|
|
3135
|
+
return of(false);
|
|
3132
3136
|
}
|
|
3133
3137
|
/**
|
|
3134
3138
|
* Get the URL that entered the app. May be a deep link that could then be
|
|
@@ -3435,8 +3439,7 @@ const init_moduleFnc = () => {
|
|
|
3435
3439
|
const http = inject(HttpClient);
|
|
3436
3440
|
const configService = inject(ConfigService);
|
|
3437
3441
|
const authService = inject(AuthService);
|
|
3438
|
-
authService.setInitialRequestUri()
|
|
3439
|
-
return coreConfig.main
|
|
3442
|
+
return authService.setInitialRequestUri().pipe(switchMap(() => coreConfig.main
|
|
3440
3443
|
? !Array.isArray(coreConfig.main)
|
|
3441
3444
|
? of([coreConfig.main])
|
|
3442
3445
|
: forkJoin([...coreConfig.main].map((uri) => http.get(`${Utils.getBaseHref()}${uri}`).pipe(catchError((e) => {
|
|
@@ -3451,7 +3454,7 @@ const init_moduleFnc = () => {
|
|
|
3451
3454
|
};
|
|
3452
3455
|
return of(true);
|
|
3453
3456
|
}))))
|
|
3454
|
-
: of(false);
|
|
3457
|
+
: of(false)));
|
|
3455
3458
|
};
|
|
3456
3459
|
|
|
3457
3460
|
var DeviceScreenOrientation;
|