fix(console): statehandler (#4042)

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Max Peintner 2022-07-26 06:41:49 +02:00 committed by GitHub
parent 0ebda7caaa
commit 9347a196c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -15,6 +15,9 @@ import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { AuthConfig, OAuthModule, OAuthStorage } from 'angular-oauth2-oidc'; import { AuthConfig, OAuthModule, OAuthStorage } from 'angular-oauth2-oidc';
import { QuicklinkModule } from 'ngx-quicklink'; import { QuicklinkModule } from 'ngx-quicklink';
import { from, Observable } from 'rxjs'; import { from, Observable } from 'rxjs';
import { AuthGuard } from 'src/app/guards/auth.guard';
import { RoleGuard } from 'src/app/guards/role.guard';
import { UserGuard } from 'src/app/guards/user.guard';
import { InfoOverlayModule } from 'src/app/modules/info-overlay/info-overlay.module'; import { InfoOverlayModule } from 'src/app/modules/info-overlay/info-overlay.module';
import { AssetService } from 'src/app/services/asset.service'; import { AssetService } from 'src/app/services/asset.service';
@ -120,6 +123,9 @@ const authConfig: AuthConfig = {
ServiceWorkerModule.register('ngsw-worker.js', { enabled: false }), ServiceWorkerModule.register('ngsw-worker.js', { enabled: false }),
], ],
providers: [ providers: [
AuthGuard,
RoleGuard,
UserGuard,
ThemeService, ThemeService,
{ {
provide: APP_INITIALIZER, provide: APP_INITIALIZER,

View File

@ -13,7 +13,7 @@ export class StatehandlerProcessorServiceImpl implements StatehandlerProcessorSe
constructor(private location: Location, private router: Router) {} constructor(private location: Location, private router: Router) {}
public createState(url: string): string { public createState(url: string): string {
const externalUrl = this.location.prepareExternalUrl(url); const externalUrl = url;
const urlId = uuidv4(); const urlId = uuidv4();
sessionStorage.setItem(urlId, externalUrl); sessionStorage.setItem(urlId, externalUrl);
return urlId; return urlId;