File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
src/app/features/home/explore-tab/explore-tab Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 7
7
8
8
< ng-template #bubbleIframe >
9
9
< iframe
10
- [src] ="bubbleIframeUrl $ | ngrxPush | safeResourceUrl "
10
+ [src] ="bubbleIframeUrlWithJWTToken $ | ngrxPush | safeResourceUrl "
11
11
class ="bubble-iframe "
12
12
> </ iframe >
13
13
</ ng-template >
Original file line number Diff line number Diff line change 1
1
import { Component } from '@angular/core' ;
2
2
import { DomSanitizer } from '@angular/platform-browser' ;
3
+ import { defer } from 'rxjs' ;
3
4
import { map } from 'rxjs/operators' ;
4
5
import { DiaBackendAuthService } from '../../../../shared/dia-backend/auth/dia-backend-auth.service' ;
5
6
import { BUBBLE_IFRAME_URL } from '../../../../shared/dia-backend/secret' ;
6
7
import { ErrorService } from '../../../../shared/error/error.service' ;
7
8
import { NetworkService } from '../../../../shared/network/network.service' ;
8
- import { isNonNullable } from '../../../../utils/rx-operators/rx-operators' ;
9
9
10
10
@Component ( {
11
11
selector : 'app-explore-tab' ,
12
12
templateUrl : './explore-tab.component.html' ,
13
13
styleUrls : [ './explore-tab.component.scss' ] ,
14
14
} )
15
15
export class ExploreTabComponent {
16
- readonly bubbleIframeUrl$ = this . diaBackendAuthService . token$ . pipe (
17
- isNonNullable ( ) ,
18
- map ( token => {
19
- return `${ BUBBLE_IFRAME_URL } /?token=${ token } ` ;
20
- } )
21
- ) ;
16
+ readonly bubbleIframeUrlWithJWTToken$ = defer ( ( ) => {
17
+ return this . diaBackendAuthService . queryJWTToken$ ( ) . pipe (
18
+ map ( token => {
19
+ return `${ BUBBLE_IFRAME_URL } /?token=${ token . access } &refresh_token=${ token . refresh } ` ;
20
+ } )
21
+ ) ;
22
+ } ) ;
22
23
23
24
readonly networkConnected$ = this . networkService . connected$ ;
24
25
You can’t perform that action at this time.
0 commit comments