Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking change, session null onAuthStateChange #1335

Open
2 tasks done
cmcnicholas opened this issue Dec 13, 2024 · 1 comment
Open
2 tasks done

Breaking change, session null onAuthStateChange #1335

cmcnicholas opened this issue Dec 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@cmcnicholas
Copy link

cmcnicholas commented Dec 13, 2024

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

After upgrading to latest library version 2.47.6 from 2.47.5 I am being logged out of my application due to a null session.

To Reproduce

We use the following to map auth session values to a reactive value. I've never before experienced null sessions when logged in.

    // listen to auth state changes
    client.auth.onAuthStateChange((event, session) => {
      if (session === null) {
        window.location.href = createRedirectUrl('unauthenticated_state', window.location.href);
      } else {
        authSession.value = session;
      }
    });

Expected behavior

null session shouldn't be reported as the session is valid (prior call to GetSession() confirms this.

@cmcnicholas cmcnicholas added the bug Something isn't working label Dec 13, 2024
@cmcnicholas cmcnicholas changed the title Breaking change, session null onAuthStateChange Breaking change, session null onAuthStateChange Dec 13, 2024
@tzhf
Copy link

tzhf commented Dec 13, 2024

Pretty sure this is it : #1334
Fix Merged #1337 and released: v2.47.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants