简体   繁体   中英

Can I Auth a user through Firebase and use Supabase (private) buckets without relying on Supabase Auth users limitation

I have an Ionic application that use a pretty small file(1kb) to store user info. I want to implement cloud backup for it. The user just need to download it once, when restoring backup. All other operations are uploads.

Firebase can provide Auth, but the amount of Cloud Storage upload operations aren't enough. (my app does upload several times)

Supabase is more generous on storage its storage, but I have about +50k users. So can't use its Auth features.

I also tried Google Sign-in and access on Google Drive. Which has a free specific app-folder. However, couldn't get any example on how to access this folder (download/upload) through JavaScript.

Even using Gapi. Which I tried through this repo(ng-gapi)

So, my question is: Can I Auth a user through Firebase and use Supabase (private) buckets (since the file access must be authenticated) without relying on Supabase Auth users limitation?

If you're going for a fully Firebase/Supabase only approach, and can't have any kind of middleman API, you may be out of luck.

Otherwise, the best way to use Supabase's storage system alongside Firebase's auth system is to create an API of whatever kind (Cloud Function, etc) that checks if the Firebase user has the permissions to create/read/update/delete the file(s), and if so to do whatever the user wants. You can disable public access to the Supabase bucket and pass the files through the custom API.

This may not be the only way, this is just the way I thought of.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM