mirzemehdi / KMPAuth

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

GoogleAuthUiProvider error: No credentials available #20

Closed eye-dee closed 6 months ago

eye-dee commented 7 months ago

Hello

Thank you for setting up the example. I have a quick question regarding an issue I am experiencing

When clicking on sign in with google, I am getting GoogleAuthUiProvider error: No credentials available (let me know if you need the whole stacktrace)

I don't fully understand, if I need to do anything before being able to sign in with google

mirzemehdi commented 6 months ago

@eye-dee usually this happens when user doesn't have already signed in user, when testing in emulators.

This error is also same as this https://github.com/mirzemehdi/KMPAuth/issues/19. New Credential Manager doesn't support some devices, I am planning to implement old credential manager when this issue happened thanks to @stevdza-san 's suggestion.

mirzemehdi commented 6 months ago

Can you please let me know if this happens when you sign-in with google in device and trying again?

eye-dee commented 6 months ago

Hello @mirzemehdi

Thanks for checking my issue. I have investigated a bit what happens, but up until now I couldn't find any explanation.

This error is also same as this https://github.com/mirzemehdi/KMPAuth/issues/19. New Credential Manager doesn't support some devices, I am planning to implement old credential manager when this issue happened thanks to @stevdza-san 's suggestion.

I haven't seen mentioned errors on my side, not sure if that issue is related, but I will check again

Can you please let me know if this happens when you sign-in with google in device and trying again?

This happens always regardless of what I do To give more details:

  1. I have tried it on my real device, where I have multiple accounts in credential manager and in other applications similar functionalities work(see the screenshot attached) image

  2. When trying an emulator it gives the same error (No Credentials available). But there I can understand it since on fresh emulator there is no accounts signed in. However the same happens when I am signing in settings or photos app. The most strange thing for me is that when I shared account that I use in emulator to sign in with my friend, he did the same thing (run KMPAuth example on emulator with my account singed in settings) and for him it worked fine

mirzemehdi commented 6 months ago

@eye-dee Fixed in in 1.4.0 version

eye-dee commented 5 months ago

Hey @mirzemehdi

Thank you for the update, I have checked on my side, for some reason it always defaults into legacy sign in, so it doesn't use system auth. But this is smth on my side I believe

mirzemehdi commented 5 months ago

@eye-dee Probably something with your device. In logcat actually it should also print related error