1
- import { HttpHeaders } from '@angular/common/http' ;
2
- import { Inject , Injectable } from '@angular/core' ;
3
- import { Router } from '@angular/router' ;
4
- import { APP_CONFIG } from '@project-lib/app-config' ;
1
+ import { HttpHeaders } from '@angular/common/http' ;
2
+ import { Inject , Injectable } from '@angular/core' ;
3
+ import { Router } from '@angular/router' ;
4
+ import { APP_CONFIG } from '@project-lib/app-config' ;
5
5
6
6
import {
7
7
CoreAuthModule ,
@@ -18,20 +18,20 @@ import {
18
18
GetTokenCommand ,
19
19
GetCurrentUserCommand ,
20
20
} from '@project-lib/core/auth' ;
21
- import { SignUpAdapter } from '@project-lib/core/auth/adapters/signup-adapter.service' ;
22
- import { CreateExternalUserCommand } from '@project-lib/core/auth/commands/create-external-user.command' ;
23
- import { CreateTokenCommand } from '@project-lib/core/auth/commands/create-token.command' ;
21
+ import { SignUpAdapter } from '@project-lib/core/auth/adapters/signup-adapter.service' ;
22
+ import { CreateExternalUserCommand } from '@project-lib/core/auth/commands/create-external-user.command' ;
23
+ import { CreateTokenCommand } from '@project-lib/core/auth/commands/create-token.command' ;
24
24
import {
25
25
AuthTokenSkipHeader ,
26
26
ErrToastSkipHeader ,
27
27
} from '@project-lib/core/constants' ;
28
- import { IAnyObject } from '@project-lib/core/i-any-object' ;
28
+ import { IAnyObject } from '@project-lib/core/i-any-object' ;
29
29
import {
30
30
AnyAdapter ,
31
31
ApiService ,
32
32
UserSessionStoreService ,
33
33
} from '@project-lib/core/index' ;
34
- import { NgxPermissionsService } from 'ngx-permissions' ;
34
+ import { NgxPermissionsService } from 'ngx-permissions' ;
35
35
import {
36
36
Observable ,
37
37
switchMap ,
@@ -66,7 +66,7 @@ export class AuthService {
66
66
private readonly anyAdapter : AnyAdapter ,
67
67
private readonly permissionsService : NgxPermissionsService ,
68
68
@Inject ( APP_CONFIG ) private readonly appConfig : IAnyObject ,
69
- ) { }
69
+ ) { }
70
70
71
71
public isLoggedIn ( ) : Observable < boolean > {
72
72
return this . currentUser ( ) . pipe (
@@ -343,6 +343,7 @@ export class AuthService {
343
343
) ;
344
344
}
345
345
346
+
346
347
loginViaCognito ( ) : void {
347
348
const form = document . createElement ( 'form' ) ;
348
349
form . method = 'POST' ;
0 commit comments