supabase / auth-js

An isomorphic Javascript library for Supabase Auth.
MIT License
321 stars 153 forks source link

Internals.debug accesses localStorage before it's fully known that it can #752

Closed jackmerrill closed 11 months ago

jackmerrill commented 11 months ago

Bug report

Describe the bug

This would normally not break anything in a normal Javascript environment. However, if using Deno and compiling to an executable, it breaks as Deno executables can't access localStorage.

To Reproduce

Create a Deno application that uses GoTrue, compile and try to run the compiled program. (sorry if this is vague, its the best I can easily give)

The following error appears:

error: Uncaught NotSupported: LocalStorage is not supported in this context.
    at https://esm.sh/v130/@supabase/gotrue-js@2.46.1/denonext/gotrue-js.mjs:4:26743

Expected behavior

It shouldn't error.

System information

Additional context

I've created a simple fix and will create a PR shortly.

github-actions[bot] commented 11 months ago

:tada: This issue has been resolved in version 2.46.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: