Closed sindrsh closed 1 year ago
Hi @sindrsh ,
what do you mean by "fails to sign in a new user"?
Is the signal _on_signed_in
never called? Or is the client
variable null?
Have you tried connecting the on_error
signal to check if there is any error (or yielding on the AuthTask
to get both data
and error
)?
https://github.com/supabase-community/godot-engine.supabase/blob/425800d67c57caad51ee677b70b023e3108c9592/addons/supabase/Auth/auth_task.gd#L30-L32
Thanks
When performing a new sign when the signed_out
signal is emitted, SubabaseAuth.sign_in()
returns _Checkout()
because _auth != ""
(line 94 of SupabaseAuth
). From there the process continues without catching any errors but it does not result in a new sign in.
Thank you so much for this tool by the way :+1:
You are welcome, I'll look into it later today :)
https://github.com/supabase-community/godot-engine.supabase/blob/425800d67c57caad51ee677b70b023e3108c9592/addons/supabase/Auth/auth.gd#L313
The result is that when a new sign in is attempted when signed_out signal is emitted, the Supabase.sign_in method fails to sign in a new user without reporting an error.
My first thought on this is simply moving the emit(signed_out) to line 317, but it could be I'm missing on something from the bigger picture here.