Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the cookies option doesn't seem to be doing anything #721

Open
2 tasks done
JorensM opened this issue Jan 19, 2024 · 1 comment
Open
2 tasks done

the cookies option doesn't seem to be doing anything #721

JorensM opened this issue Jan 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@JorensM
Copy link

JorensM commented Jan 19, 2024

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

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

supabase cookies option

In this code I posted you can see that I've simply added console.logs 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 the auth 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 separate cookie 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 in auth to manage cookies, and considering that the getters/setters never get called anyway. I'd expect at the very least for the cookies property not to be required.

Expected behavior

I'd expect for either:

a) the cookies functions to be called
b) the cookies property to be optional

Screenshots

See screenshot of my Supabase config above.

System information

  • OS: Windows 10
  • Browser: Chrome
  • Version of supabase-js: 2.39.3
  • Version of supabase/ssr: 0.0.10
  • Version of Node.js: 20.8.0

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.

@KyleFontenot
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants