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

Auth tokens stacking and causing 431 #402

Open
bootsmann1995 opened this issue Aug 23, 2024 · 0 comments
Open

Auth tokens stacking and causing 431 #402

bootsmann1995 opened this issue Aug 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bootsmann1995
Copy link

Hello
I'm quite new at using supabase. Every time i update an user i get antoher token in my application cookies. This is stacking and causing the browser to throw an http 431.
I'm using nuxt and the supabase nuxt module.

I'm updating the user 1-10 times a day and can happend within 5 min. this is the code i use to update my user metadata:
const updateUser = async (data: any) => {
try {
const updatedUser = await supabase.auth.updateUser({ data });
return updatedUser;
} catch (error) {
console.error("Error updating user:", error);
throw error;
}
};

heres the network stacked data: image

and heres an example of user_metadata:
https://pastebin.com/jrCtZGND

Version

@nuxtjs/supabase:
nuxt:

Reproduction Link

https://booty-ai.nuxt.dev/

Steps to reproduce

  1. go to https://booty-ai.nuxt.dev/signup
  2. login https://booty-ai.nuxt.dev/
  3. go to https://booty-ai.nuxt.dev/feed
  4. add point and refresh page 2-3 times
  5. the error happends

Don't know if im using the update user wrong, but the use case is i have a neews/education feed via chat bot gemini. So it's basically just multiple chat instances running on the user feed. But automated. So this needs an user update for every news feed updated (once a day when in production). So the user meta data is updated when the news feed has been updated.

@bootsmann1995 bootsmann1995 added the bug Something isn't working label Aug 23, 2024
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

1 participant