Skip to content
This repository has been archived by the owner on May 13, 2023. It is now read-only.

fix: going back to using auth headers for SupabaseQueryBuilder #192

Merged
merged 5 commits into from
Apr 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
6 changes: 5 additions & 1 deletion lib/src/supabase_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ class SupabaseClient {
return SupabaseQueryBuilder(
url,
realtime,
headers: {...rest.headers},
headers: {
...rest.headers,
..._getAuthHeaders(),
},
schema: schema,
table: table,
httpClient: _httpClient,
Expand All @@ -119,6 +122,7 @@ class SupabaseClient {
Map<String, dynamic>? params,
FetchOptions options = const FetchOptions(),
}) {
rest.headers.addAll({...rest.headers, ..._getAuthHeaders()});
return rest.rpc(fn, params: params, options: options);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1 +1 @@
const version = '1.6.3';
const version = '1.6.4';
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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'

Expand Down