AW-6046 Angular improvement
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
@@ -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("/");
|
||||
});
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user