Complete the code to initialize Supabase Auth client.
const supabase = createClient([1], 'public-anon-key');
The Supabase client requires the project URL to connect to the backend services, including Auth.
Complete the code to sign in a user with email and password.
const { data, error } = await supabase.auth.[1]({ email, password });The method signInWithPassword is used to authenticate users with email and password in Supabase Auth.
Fix the error in the code to get the current authenticated user.
const { data: { user }, error } = await supabase.auth.[1]();The correct method to retrieve the current user object is getUser() in Supabase Auth.
Fill both blanks to handle sign out and listen for auth state changes.
await supabase.auth.[1](); supabase.auth.onAuthStateChange((event, session) => { console.log(event, session); }, [2]);
Use signOut() to log out the user and listen for the SIGNED_OUT event to handle changes.
Fill all three blanks to update user metadata after authentication.
const { data, error } = await supabase.auth.updateUser({ [1]: [2] });
console.log([3]);Use user_metadata to update metadata, pass the new metadata object, and log the returned data.