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

Commit

Permalink
fix: going back to using auth headers for SupabaseQueryBuilder (#192)
Browse files Browse the repository at this point in the history
* going back to using auth headers for SupabaseQueryBuilder

* chore: publish v1.6.4

* get auth headers for rpc as well

* keep both rest headers and auth headers

* use rest for rpc
  • Loading branch information
dshukertjr authored Apr 30, 2023
1 parent 9757207 commit 5912e39
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
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

0 comments on commit 5912e39

Please sign in to comment.