@supabase/auth-js 2.110.1 → 2.110.2-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supabase/auth-js",
3
- "version": "2.110.1",
3
+ "version": "2.110.2-canary.0",
4
4
  "private": false,
5
5
  "description": "Official SDK for Supabase Auth",
6
6
  "keywords": [
@@ -4000,6 +4000,10 @@ export default class GoTrueClient {
4000
4000
  { scope }: SignOut = { scope: 'global' }
4001
4001
  ): Promise<{ error: AuthError | null }> {
4002
4002
  return await this._useSession(async (result) => {
4003
+ const removeCurrentSession = async () => {
4004
+ await this._removeSession()
4005
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`)
4006
+ }
4003
4007
  const { data, error: sessionError } = result
4004
4008
  if (sessionError && !isAuthSessionMissingError(sessionError)) {
4005
4009
  return this._returnResult({ error: sessionError })
@@ -4017,13 +4021,15 @@ export default class GoTrueClient {
4017
4021
  isAuthSessionMissingError(error)
4018
4022
  )
4019
4023
  ) {
4024
+ if (scope !== 'others') {
4025
+ await removeCurrentSession()
4026
+ }
4020
4027
  return this._returnResult({ error })
4021
4028
  }
4022
4029
  }
4023
4030
  }
4024
4031
  if (scope !== 'others') {
4025
- await this._removeSession()
4026
- await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`)
4032
+ await removeCurrentSession()
4027
4033
  }
4028
4034
  return this._returnResult({ error: null })
4029
4035
  })
@@ -4,4 +4,4 @@
4
4
  // - Debugging and support (identifying which version is running)
5
5
  // - Telemetry and logging (version reporting in errors/analytics)
6
6
  // - Ensuring build artifacts match the published package version
7
- export const version = '2.110.1'
7
+ export const version = '2.110.2-canary.0'