CodetrixStudio / CapacitorGoogleAuth

Capacitor plugin for Google Auth. Lightweight & no dependencies.
MIT License
281 stars 153 forks source link

Problems with confusing URL schemes (iOS) #379

Open alexp25 opened 2 months ago

alexp25 commented 2 months ago

I am constantly getting errors trying to configure this plugin on Capacitor iOS platform.

Could you clarify what each of the errors mean in terms of incorrect configuration? What error appears on what configuration (and what configuration is correct?)

It's not clear to me:

Also, having built the app, and running (but authentication not working), when I try to upload on TestFlight, I get this error:

The following URL schemes found in your app are not in the correct format: [xxxxxx-yyyyyyyyyyyyyyyyyy.apps.googleusercontent.com]. URL schemes need to begin with an alphabetic character, and be comprised of alphanumeric characters, the period, the hyphen or the plus sign only. Please see RFC1738 for more detail.

So it's the other way around? But then the app crashes.

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Your app is missing support for the following URL schemes: xxxxxx-yyyyyyyyyyyyyyyyyy.apps.googleusercontent.com'

alexp25 commented 2 months ago

Figured it out that I had to use the reversed URL scheme in the Info.plist, and the non-reversed URL scheme in the plugin config, both of them for iOS, not web client IDs. Very confusing... this needs better documentation and explicit examples in the Readme.