Skip to content

is it bad pattern to create two supabase clients on serverside ? #21027

Discussion options

You must be logged in to vote

Seems like you want to look at ssr/auth-helpers. https://supabase.com/docs/guides/auth/server-side/overview

If you have browser/app and server code then it is complicated to keep all clients in sync as far as expiring jwt's and logging in.
You can't pass a session to server side code and refresh it there if you don't then pass the session back to the client. Two clients cannot refresh the same jwt.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@psm-solution-group
Comment options

@GaryAustin1
Comment options

Answer selected by J0
@psm-solution-group
Comment options

@GaryAustin1
Comment options

@psm-solution-group
Comment options

@GaryAustin1
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants