Complete the code to initialize Supabase client with session persistence.
const supabase = createClient(supabaseUrl, supabaseKey, { auth: { persistSession: [1] } });Setting persistSession to true enables session persistence in Supabase client.
Complete the code to get the current user session from Supabase auth.
const session = await supabase.auth.[1]();The method getSession() returns the current user session object.
Fix the error in the code to listen for auth state changes and update session.
supabase.auth.onAuthStateChange((event, [1]) => { session = [1]; });
The callback provides the new session as the second argument named session.
Fill both blanks to sign in a user with email and password using Supabase auth.
const { data, error } = await supabase.auth.[1]({ email: userEmail, [2]: userPassword });Use signInWithPassword method and the key password to authenticate with email and password.
Fill all three blanks to refresh the session token manually using Supabase auth.
const { data, error } = await supabase.auth.[1](); if (!error) { const newAccessToken = data.[2].[3]; }The method refreshSession() refreshes tokens. The new access token is accessed via data.session.access_token.