how to remove this error : i have an error during click to google sign in button… the error shows
Uncaught (in promise): TypeError: Cannot read properties of undefined (reading ‘grantOfflineAccess’)
TypeError: Cannot read properties of undefined (reading ‘grantOfflineAccess’)
my code is :
click.page.html:
<ion-title>
Google Auth
</ion-title>
<ion-button>Login with Google</ion-button>
click.page.ts:
import { Component, OnInit } from ‘@angular/core’;
import { Plugins } from ‘@capacitor/core’;
import ‘@codetrix-studio/capacitor-google-auth’;
@Component({
selector: ‘app-click’,
templateUrl: ‘./click.page.html’,
styleUrls: [’./click.page.scss’],
})
export class ClickPage implements OnInit {
constructor() {}
ngOnInit() {
this.login();
}
login() {
const googleUser = Plugins.GoogleAuth.signIn(null);
console.log('user = ', googleUser);
}
}