Nextbase Docs
Known Issues

Supabase getSession() Warning

Explanation of the known warning when using Supabase getSession() and the upcoming fix.

Supabase getSession() Warning

You may encounter a warning when using the getSession() method from Supabase's auth-js library. This is a known issue that has been identified and is being addressed by the Supabase team. In most cases, the warning can be safely ignored since this warning features most of the time because of usage in middleware. However, a middleware is a critical part of any Next.js application's speed of route resolution and as several users pointed out in the github issue, this warning is unnecessary as middlewares should avoid network requests as much as possible and only authenticate by validating the cookie. A network for each middleware path will slow down app significantly.

Current Status

We are aware of this issue, which is tracked in the following GitHub pull request:

https://github.com/supabase/auth-js/pull/895

Temporary Workaround

The Supabase team was requested to remove the warning. Once they implement the fix upstream, we will update our package to incorporate the changes. This update will eliminate the warning message. While waiting for the official fix, you can safely continue using the getSession() method. The warning does not affect the functionality of your application, but it may appear in your console logs.

Stay Updated

We recommend keeping an eye on the GitHub pull request mentioned above for the most up-to-date information on the progress of this fix. Once the update is available, we will promptly integrate it into our package.

On this page