diff --git a/CHANGELOG.md b/CHANGELOG.md index f9ab9f1..61e99ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [1.6.4] +- fix: race condition for passing auth headers for rest client [#192](https://github.com/supabase/supabase-dart/pull/192) + + ## [1.6.3] - fix: copy headers value on from() call [#189](https://github.com/supabase/supabase-dart/pull/189) diff --git a/lib/src/supabase_client.dart b/lib/src/supabase_client.dart index e058607..613f231 100644 --- a/lib/src/supabase_client.dart +++ b/lib/src/supabase_client.dart @@ -104,7 +104,10 @@ class SupabaseClient { return SupabaseQueryBuilder( url, realtime, - headers: {...rest.headers}, + headers: { + ...rest.headers, + ..._getAuthHeaders(), + }, schema: schema, table: table, httpClient: _httpClient, @@ -119,6 +122,7 @@ class SupabaseClient { Map? params, FetchOptions options = const FetchOptions(), }) { + rest.headers.addAll({...rest.headers, ..._getAuthHeaders()}); return rest.rpc(fn, params: params, options: options); } diff --git a/lib/src/version.dart b/lib/src/version.dart index c49e4a0..3c26117 100644 --- a/lib/src/version.dart +++ b/lib/src/version.dart @@ -1 +1 @@ -const version = '1.6.3'; +const version = '1.6.4'; diff --git a/pubspec.yaml b/pubspec.yaml index a09ff93..968922c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: supabase description: A dart client for Supabase. This client makes it simple for developers to build secure and scalable products. -version: 1.6.3 +version: 1.6.4 homepage: 'https://supabase.io' repository: 'https://github.com/supabase/supabase-dart'