Skip to content

Instantly share code, notes, and snippets.

@enappd
Last active July 26, 2021 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enappd/4c01430a22b6e6736448c66545535fee to your computer and use it in GitHub Desktop.
Save enappd/4c01430a22b6e6736448c66545535fee to your computer and use it in GitHub Desktop.
Ionic Angular Capacitor Google Login
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