CodetrixStudio / CapacitorGoogleAuth

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

Allow google cloud credentials #63

Open albert-mllrdev opened 4 years ago

albert-mllrdev commented 4 years ago

Currently the plugin is dependent on credentials from https://firebase.google.com/ and won't work with just credentials from https://console.cloud.google.com/

On Android, this is due to the googleSignInBuilder having this two methods

.requestIdToken(clientId)
.requestServerAuthCode(clientId, forceCodeForRefreshToken)

While on iOS the googleSignIn property is requiring the GoogleService-Info.plist and retrieving the clientID from that file. And it's also assigning a value to googleSignIn.serverClientID which is not needed when just using the google cloud client id

A simple if statement and a capacitor.config.json option on which credentials to use would solve this

bbjoern commented 4 years ago

@albert-mllrdev I have the same issue since I use Firebase and separate PeopleAPI Call I need both options as well. Did you find a workaround until this gets fixed ?