Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: A provider must be specified #68

Closed
2 tasks done
ferhatwi opened this issue Mar 15, 2023 · 2 comments
Closed
2 tasks done

[Bug]: A provider must be specified #68

ferhatwi opened this issue Mar 15, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ferhatwi
Copy link
Contributor

ferhatwi commented Mar 15, 2023

General Info

  • I installed the latest version of Supabase-Kt
  • I checked for similar bug report

What happened? (include your code)

Sign In with IDToken throws "A provider must be specified" even though a provider is specified.

put("provider", it.name)

returns null at

value.provider?.let {
    put("provider", it.name)
} ?: throw IllegalArgumentException("A provider must be specified.")

So new code should be:

value.provider?.aslo {
    put("provider", it.name)
} ?: throw IllegalArgumentException("A provider must be specified.")

to avoid null return of the put method.

Platform(s)

Android

Relevant log output

java.lang.IllegalArgumentException: A provider must be specified.
     at io.github.jan.supabase.gotrue.providers.builtin.DefaultAuthProvider$Config$Companion.serialize(DefaultAuthProvider.kt:58)
@ferhatwi ferhatwi added the bug Something isn't working label Mar 15, 2023
@ferhatwi ferhatwi changed the title [Bug]: Misuse of let [Bug]: A provider must be specified Mar 15, 2023
@jan-tennert
Copy link
Collaborator

Should be fixed in alpha 3

@jan-tennert
Copy link
Collaborator

@ferhatwi Does it work now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants