| 
						
						
						
					 | 
					@ -1,7 +1,7 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; | 
					 | 
					 | 
					import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import { Router } from '@angular/router'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; | 
					 | 
					 | 
					import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { WebAuthnService } from '@ghostfolio/client/services/web-authn.service'; | 
					 | 
					 | 
					import { WebAuthnService } from '@ghostfolio/client/services/web-authn.service'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { Router } from '@angular/router'; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					@Component({ | 
					 | 
					 | 
					@Component({ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  selector: 'gf-webauthn-page', | 
					 | 
					 | 
					  selector: 'gf-webauthn-page', | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -18,14 +18,14 @@ export class WebauthnPageComponent implements OnInit { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private webAuthnService: WebAuthnService | 
					 | 
					 | 
					    private webAuthnService: WebAuthnService | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  ) {} | 
					 | 
					 | 
					  ) {} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					  ngOnInit(): void { | 
					 | 
					 | 
					  public ngOnInit() { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    this.signIn(); | 
					 | 
					 | 
					    this.signIn(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  } | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  public deregisterDevice() { | 
					 | 
					 | 
					  public deregisterDevice() { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    this.webAuthnService | 
					 | 
					 | 
					    this.webAuthnService.deregister().subscribe(() => { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					      .deregister() | 
					 | 
					 | 
					      this.router.navigate(['/']); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					      .subscribe(() => this.router.navigate([''])); | 
					 | 
					 | 
					    }); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					  } | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  public signIn() { | 
					 | 
					 | 
					  public signIn() { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -34,7 +34,7 @@ export class WebauthnPageComponent implements OnInit { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    this.webAuthnService.login().subscribe( | 
					 | 
					 | 
					    this.webAuthnService.login().subscribe( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      ({ authToken }) => { | 
					 | 
					 | 
					      ({ authToken }) => { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        this.tokenStorageService.saveToken(authToken, false); | 
					 | 
					 | 
					        this.tokenStorageService.saveToken(authToken, false); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        this.router.navigate(['']); | 
					 | 
					 | 
					        this.router.navigate(['/']); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					      }, | 
					 | 
					 | 
					      }, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      (error) => { | 
					 | 
					 | 
					      (error) => { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        console.error(error); | 
					 | 
					 | 
					        console.error(error); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |