CapacitorGoogleAuth icon indicating copy to clipboard operation
CapacitorGoogleAuth copied to clipboard

Problem with Android and Capacitor 2

Open GosuMania opened this issue 4 years ago • 1 comments

Hi everyone, I have been trying to log in with Google for several days but without success on Android devices. If I try on the Web it works perfectly, while on Android devices it doesn't work.

I initially got this error when trying to build the project after installing CodetrixStudio/CapacitorGoogleAuth:

Types of property 'Plugins' are incompatible.
Property 'GoogleAuth' is missing in type '{[pluginName: string]: {[prop: string]: any; }; } 'but required in type' PluginRegistry '.

I using version "@ capacitor / core": "2.4.9", "@ codetrix-studio / capacitor-google-auth": "2.1.3".

To fix this first error I replaced the PluginRegistry type with an any type in the CodetrixStudio plugin and it now works perfectly on the web.

But on Android I get an error in the console after selecting the account with which to log in with Google, the error is the one in the picture: 258849760_10225330646989901_7847418710243653188_n

As a reference guide I also consulted the official documentation, obviously the one for Capacitor 2 because I have not yet updated the app to Capacitor 3: https://github.com/.../79129ab37288f5f5d0bb9a56.../README.md

Could you kindly help me please?

GosuMania avatar Nov 22 '21 09:11 GosuMania

I regenerated the SHA1 code, I solved it!

GosuMania avatar Nov 23 '21 20:11 GosuMania