Last active
July 26, 2021 18:49
-
-
Save enappd/4c01430a22b6e6736448c66545535fee to your computer and use it in GitHub Desktop.
Ionic Angular Capacitor Google Login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { ActivatedRoute, Router } from '@angular/router'; | |
import { GoogleAuth } from '@codetrix-studio/capacitor-google-auth'; | |
@Component({ | |
selector: 'app-landing', | |
templateUrl: './landing.page.html', | |
styleUrls: ['./landing.page.scss'], | |
}) | |
export class LandingPage implements OnInit { | |
user: any; | |
constructor(private route: ActivatedRoute, private router: Router) { | |
this.route.queryParams.subscribe(params => { | |
let data = this.router.getCurrentNavigation().extras.state; | |
if (data.user) { | |
this.user = data.user; | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment