Closed JorensM closed 1 month ago
I'm pretty confident get
, set
, and remove
should be synchronous instead of async. If you remove async
do you still get the same results?
This is expected. createServer/BrowserClient
implement their own storage option. So if you already set your own, your custom option (AsyncStorage
) wins.
Bug report
Describe the bug
Setting the CRUD functions for the
cookies
option doesn't seem to be doing anything. The functions never get called.To Reproduce
In this code I posted you can see that I've simply added
console.log
s to the setter/getter/remover. Yet the console never logs any of those messages. I should also note that I'm using a custom storage handler in theauth
option. I should also say that I know that the Supabase client uses the auth storage to store cookies. Which then begs the question: why do we have a separatecookie
CRUD object if it's not being used? Currently TypeScript says that this property is required, which seems redundant considering that the client is using the storage defined inauth
to manage cookies, and considering that the getters/setters never get called anyway. I'd expect at the very least for thecookies
property not to be required.Expected behavior
I'd expect for either:
a) the
cookies
functions to be called b) thecookies
property to be optionalScreenshots
See screenshot of my Supabase config above.
System information
Additional context
I'm moving away from supabase/ssr because I found out that it only uses cookies for storing the session and doesn't offer any alternatives, which won't work for me because I'm writing an app with React Native, which doesn't support cookies. But just thought I'd share this small bug with you.