JavaScript: Retrieve a session

Returns the session, refreshing it if necessary.

Examples

Get the session data

const \{ data, error \} = await supabase.auth.getSession()