CodetrixStudio / CapacitorGoogleAuth

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

Add fitness scope doesn't allow login in iOS #281

Open AlanD24 opened 1 year ago

AlanD24 commented 1 year ago

This error just happens on iOS, I'm not sure if it's because the use of the API is still not verified. But in android works fine, if I add the scope "https://www.googleapis.com/auth/fitness.activity.read" on capacitor.config.ts, it actually logs in android device, but not in iOS devices.

The error says "The operation couldn't be completed. (com.google.GIDSignIn error -8.)". So I checked the issues section in this repository, where I found if I use "GoogleAuth.refresh()" it would work, which is false, I still present the error.

I've been looking for days if I could detect the platform where it's running but with no success. I used Capacitor.getPlatform() in capacitor.config.ts but it always returns "web", doesn't matter if I runned "ionic cap run ios" or "ionic cap run android" and I'm not finding a solution.

I tried to add this scope on GoogleAuth.initialize({ scopes: [] }), but it's not being added in my capacitor.config.ts nor capacitor.config.json. I'm not sure if initialize() function is not working.

I'd like to ask kindly for your help, please.

DmitrySkakun commented 1 year ago

Hello. I am facing the same issue. Is there any solution?