@supabase/auth-js 2.106.0-canary.4 → 2.106.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.106.0-canary.4",
3
+ "version": "2.106.0",
4
4
  "private": false,
5
5
  "description": "Official SDK for Supabase Auth",
6
6
  "keywords": [
@@ -2305,7 +2305,7 @@ export default class GoTrueClient {
2305
2305
  }
2306
2306
 
2307
2307
  const session: Session | null = data.session
2308
- const user: User = data.user
2308
+ const user: User | null = data.user
2309
2309
 
2310
2310
  if (session?.access_token) {
2311
2311
  await this._saveSession(session as Session)
package/src/lib/fetch.ts CHANGED
@@ -253,7 +253,9 @@ export function _sessionResponse(data: GoTrueSessionData): AuthResponse {
253
253
  }
254
254
  }
255
255
 
256
- const user: User = data.user ?? (data as User)
256
+ // Some /verify responses (e.g. secure email_change first-confirmation) return
257
+ // only `{ msg, code }` with no user and no session. Treat those as null user.
258
+ const user: User | null = data.user ?? null
257
259
  return { data: { session, user }, error: null }
258
260
  }
259
261
 
@@ -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.106.0-canary.4'
7
+ export const version = '2.106.0'