quick question about your supabase-integration-guide: why do you use a signed jwt to create the user in the database instead of using a service_role-key?
r
rp_st
10/13/2022, 4:35 PM
hey @VonMorgen
rp_st
10/13/2022, 4:35 PM
perhaps @jscyo can help here
j
jscyo
10/14/2022, 6:50 AM
Hey @VonMorgen , you could definitely use the
service_role
key in your backend to create user data. In the demo, we store the JWT in the user's session to show that if a user's session exists you can interact with Supabase's APIs on both the frontend and backend using the JWT from the session. The
service_role
key does bypass RLS restrictions so that needs to be considered when using it.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).