How do I use a Supabase session server-side?

My guess is that getSession is checking localStorage because you have persistSession defaulting to on in client initialization.
First part of getSession() code.
 if (this.persistSession) {
      const maybeSession = await getItemAsync(this.storage, this.storageKey)

      if (maybeSession !== null) {
        if (this._isValidSession(maybeSession)) {
          currentSession = maybeSession
        } else {
          await this._removeSession()
        }
      }
Was this page helpful?