The way I envision it would be on the auth supabase project, use something like the npm passport library to get some sort of oauth2 quickly running inside supabase functions. Then you'd just need to do some custom db functions to hook into that auth instance I'd say