I have this sidebar component below displays user avatar and name pulled from a Supabase query filtered by user_id however each time when I tap Sign Out button triggering the built-in Log Out action it throws a GET https://xxx.supabase.co/rest/v1/users?select=%2A&id=eq.&limit=1 400 (Bad Request)
Error querying row: PostgrestException(message: {"code":"22P02","details":null,"hint":null,"message":"invalid input syntax for type uuid: \"\""}, code: 400, details: , hint: null)
on
FutureBuilder<List<UsersRow>>(
future: FFAppState().user(
uniqueQueryKey: '${currentUserUid}_settings',
requestFn: () => UsersTable().querySingleRow(
queryFn: (q) => q.eq(
'id',
currentUserUid,
),
),
)
...
}
as the SupabaseAuthManager.signOut()
method is invoked to clear the current session that results in the removal of session data but the system still tries to query the database with an invalid or empty user ID.
I tried to assign a default value to the component that doesn't work. Is there a workaround for this or am I missing something? Many thanks!