AW-6046 Angular improvement
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
2024-04-15 10:29:47 +02:00
parent ede75f63f5
commit 84a1a04b19
104 changed files with 592 additions and 796 deletions

View File

@@ -1,7 +1,6 @@
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { OAuthService } from 'angular-oauth2-oidc';
import { Location} from '@angular/common';
@Component({
selector: 'fm-auth-callback',
@@ -10,11 +9,11 @@ import { Location} from '@angular/common';
export class AuthCallbackComponent {
constructor(private router$: Router,private oauthService$:OAuthService) {
oauthService$.loadDiscoveryDocument().then(() => {
oauthService$.tryLoginCodeFlow().then(() => {
router$.navigateByUrl((oauthService$.state && oauthService$.state!="")?decodeURIComponent(oauthService$.state):"");
this.oauthService$.loadDiscoveryDocument().then(() => {
this.oauthService$.tryLoginCodeFlow().then(() => {
this.router$.navigateByUrl((this.oauthService$.state && this.oauthService$.state!="")?decodeURIComponent(this.oauthService$.state):"");
}).catch(() => {
router$.navigateByUrl("/");
this.router$.navigateByUrl("/");
});
})
}