Can GoTrue's currentSessionOrNull be used for a multi-threaded Kotlin server? #396
Closed
franzvezuli
started this conversation in
General
Replies: 1 comment 1 reply
-
Hey, its definitely possible to use this library for such a use-case. The |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm new to Supabase, but want to use it for a project. I am using Kotlin as a server (not Android), to be specific its a https://ktor.io application.
I wrote a test that invokes my apps registration endpoint in parallel
n times
and noticed that it does not retrieve the correct session thats related to the user that just registered, which leads me to believed this is supposed to be used only for a single user login context? (which for an Android app makes sense).I'm instantiating the client like so
When using something like this
then invoke
Should I be using Supabase REST API instead of this library for multi-threaded applications maybe? Or am I just using it incorrectly?
I also know
signUpWith
returns the user immediately, which I can avoid currentSessionOrNull(), but:client.auth.signInWith(Email)
does not seem to return anything at all, not even a user.Thanks! Let me know.
Beta Was this translation helpful? Give feedback.
All reactions