mirzemehdi / KMPAuth

Kotlin Multiplatform Authentication Library targetting android and iOS
https://mirzemehdi.com/KMPAuth/
Apache License 2.0
231 stars 19 forks source link

I used R8 android, it do google sign-in not working. #18

Closed thanhhoai162963 closed 4 months ago

thanhhoai162963 commented 7 months ago

I used R8 android, it do google sign-in not working. I added keep but not working.

-keep public interface com.mmk.kmpauth.google.GoogleAuthProvider { *; }
-dontwarn com.mmk.kmpauth.google.GoogleAuthProvider.**
-keep class com.mmk.kmpauth.google.GoogleAuthProvider$Companion
-keep class com.mmk.kmpauth.google.GoogleAuthUiProviderImpl
-keep class com.mmk.kmpauth.core.di.KMPKoinComponent
-keep class com.mmk.kmpauth.google.GoogleAuthProvider  { *; }
mirzemehdi commented 7 months ago

@thanhhoai162963 Could you please add error log, what happens when try it with R8 enabled?

mirzemehdi commented 6 months ago

@thanhhoai162963

https://developer.android.com/training/sign-in/passkeys#proguard

From official documentation: "In your module's proguard-rules.pro file, add the following directives:"

-if class androidx.credentials.CredentialManager
-keep class androidx.credentials.playservices.** {
  *;
}
mirzemehdi commented 6 months ago

Also please check this proguard rules as well

https://github.com/googlesamples/google-signin-unity/issues/159#issuecomment-704021107 https://github.com/googlesamples/google-signin-unity/issues/144#issuecomment-661287480