Skip to content

Commit d76c7b3

Browse files
authored
Merge pull request #1328 from supabase/chore/upgrade-rc-for-release
chore: upgrade rc for release
2 parents 78f8d6d + e74067c commit d76c7b3

File tree

3 files changed

+25
-26
lines changed

3 files changed

+25
-26
lines changed

package-lock.json

+16-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
"serve:coverage": "npm run test:coverage && serve test/coverage"
4141
},
4242
"dependencies": {
43-
"@supabase/auth-js": "2.65.1",
43+
"@supabase/auth-js": "2.66.1",
4444
"@supabase/functions-js": "2.4.3",
4545
"@supabase/node-fetch": "2.6.15",
46-
"@supabase/postgrest-js": "1.17.5",
47-
"@supabase/realtime-js": "2.10.7",
46+
"@supabase/postgrest-js": "1.17.7",
47+
"@supabase/realtime-js": "2.11.2",
4848
"@supabase/storage-js": "2.7.1"
4949
},
5050
"devDependencies": {

src/SupabaseClient.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,11 @@ export default class SupabaseClient<
117117
}
118118

119119
this.fetch = fetchWithAuth(supabaseKey, this._getAccessToken.bind(this), settings.global.fetch)
120-
121-
this.realtime = this._initRealtimeClient({ headers: this.headers, ...settings.realtime })
120+
this.realtime = this._initRealtimeClient({
121+
headers: this.headers,
122+
accessToken: this._getAccessToken.bind(this),
123+
...settings.realtime,
124+
})
122125
this.rest = new PostgrestClient(`${_supabaseUrl}/rest/v1`, {
123126
headers: this.headers,
124127
schema: settings.db.schema,
@@ -332,13 +335,9 @@ export default class SupabaseClient<
332335
(event === 'TOKEN_REFRESHED' || event === 'SIGNED_IN') &&
333336
this.changedAccessToken !== token
334337
) {
335-
// Token has changed
336-
this.realtime.setAuth(token ?? null)
337-
338338
this.changedAccessToken = token
339339
} else if (event === 'SIGNED_OUT') {
340-
// Token is removed
341-
this.realtime.setAuth(this.supabaseKey)
340+
this.realtime.setAuth()
342341
if (source == 'STORAGE') this.auth.signOut()
343342
this.changedAccessToken = undefined
344343
}

0 commit comments

Comments
 (0)