Can I make custom auth provider? I'd like to still...
# help
t
Can I make custom auth provider? I'd like to still take advantage of RLS, but source the JWT elsewhere (I have my own auth provider). Easiest would be if Supabase supports generating tokens like firebase does using
createCustomToken
with the user ID and service token.
I already have working auth provider which generates JWT tokens as needed. I can move it to PostgreSQL if needed (currently uses MongoDB, but since I plan to couple it with Supabase anyway I don't mind moving it, and it would make some stuff easier anyway). Firebase admin package has
createCustomToken
under their
auth
module, which is exactly what I want - it simply requires firebase token and user ID and generates JWT that clients can use.
https://supabase.io/docs/guides/self-hosting#update-api-keys I found this, which seems pretty close to what I want. Now on just to find how to create correct user accounts in the
auth
table and what exactly to put into payloads