-
I use Supabase Auth for one of my production projects. Is it possible to use Blitz.js with Supabase Auth? I looked through docs but authentication seemed to be built-in. In general, I couldn't find information on migrating from existing codebases. (Found #2054, but no answers) - Any guidance will be helpful. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Good question! I looked through the Supabase docs and examples, and it seems they only support client-side auth. So to have authenticated server calls, you will need to use something in addition to supabase (like blitz auth). What you can do, I think, is replace the default logic inside the blitz login mutation to instead call So in essence, you are using supabase to manage the identity verification, but then using blitz to manage the session. |
Beta Was this translation helpful? Give feedback.
Good question! I looked through the Supabase docs and examples, and it seems they only support client-side auth. So to have authenticated server calls, you will need to use something in addition to supabase (like blitz auth).
What you can do, I think, is replace the default logic inside the blitz login mutation to instead call
supabase.auth.signIn()
. And if successful, callctx.session.$create()
like normal blitz auth.So in essence, you are using supabase to manage the identity verification, but then using blitz to manage the session.