It varies so much with the coding environment you are using, but you have not not use auth.user() or detect it is null and wait/error/signin before your user as completed signIn. I usually use console.log near the user() and signIn logic to see if the order is messed up. There are examples for a few environments on the Supabase page.