Skip to content

auth.getUser returns an error: Auth Session Missing v2.43.2 #1702

@NickG-NZ

Description

@NickG-NZ

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 from v2.38.4 to v2.43.2, calling auth.getUser in a NextJS route handler returns an AuthSessionMissing error for a logged in user (session cookie exists and is passed to the client).
It seems to be the same bug from issue #1025 that was discovered and already fixed for edge functions. In this case it is happening when using the Supabase SSR library.

To Reproduce

Steps to reproduce the behaviour, please provide code snippets or a repository:

Run await supabaseAuthClient.auth.getUser() in a NextJS route-handler (or presumably any serverless runtime using a supabase SSR client)

Expected behavior

The user is returned.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: Ubuntu 22
  • Browser Chromium
  • Version of supabase-js: 2.43.2
  • Version of Node.js: 20

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    auth-jsRelated to the auth-js library.bugSomething isn't workingretry with latestUsers should retry with latest version of the SDK.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions