Failed to read the 'localStorage' property from 'Window': Storage is disabled

Hi, I'm getting the following error while trying to connect to Supabase using the JavaScript client library inside a Figma plugin.

I'm wracking my brain and I can't figure it out.

I have it successfully working with another plugin I built, but now I am trying to do the same thing on someone else's plugin and I am getting the following error:

Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Storage is disabled


I'm confident this is a result of trying to define custom storage as Figma plugin's do not use local storage. But I can't figure out why it's not working for this plugin.

export const supabase = createClient(
    PUBLIC_SUPABASE_API_URL,
    PUBLIC_SUPABASE_ANON_KEY,
    {
        auth: {
            storage: clientStorage,
        }
    }
)


This is what I have for clientStorage: https://gist.github.com/gavinmcfarland/9708f69f8b9c9a87e4ca88908bb34b08

Does anyone have any ideas? Have I missed a setting that I need to enable in the Supabase dashboard?
Was this page helpful?