Google Login frontend
This commit is contained in:
@@ -2,6 +2,8 @@ import { Component } from '@angular/core';
|
||||
import { BnNgIdleService } from 'bn-ng-idle';
|
||||
import {SessionDataProviderService} from "./store/session-data-provider.service";
|
||||
import {Router} from "@angular/router"; // import it to your component
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { GoogleAuth } from '@codetrix-studio/capacitor-google-auth';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
@@ -9,7 +11,11 @@ import {Router} from "@angular/router"; // import it to your component
|
||||
styleUrls: ['app.component.scss'],
|
||||
})
|
||||
export class AppComponent {
|
||||
constructor(private bnIdle: BnNgIdleService,private sessionDataProviderService : SessionDataProviderService, public router: Router) {
|
||||
constructor(
|
||||
private bnIdle: BnNgIdleService,
|
||||
private sessionDataProviderService : SessionDataProviderService,
|
||||
public router: Router,
|
||||
public platform: Platform) {
|
||||
// this.OneSignalInit();
|
||||
this.bnIdle.startWatching(2500).subscribe((res) => {
|
||||
if(res) {
|
||||
@@ -18,11 +24,18 @@ export class AppComponent {
|
||||
this.sessionDataProviderService.DestroySessionOnLogout();
|
||||
this.router.navigate(['login']);
|
||||
}
|
||||
})
|
||||
});
|
||||
this.initializeApp();
|
||||
}
|
||||
|
||||
// Call this function when your app starts
|
||||
OneSignalInit(): void {
|
||||
console.log('Moved to home');
|
||||
}
|
||||
|
||||
initializeApp(): void {
|
||||
this.platform.ready().then(() => {
|
||||
//GoogleAuth.initialize()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user