[New Plugin] Supabase.js - With Auth, Data and Storage

Hi Bubblers,

We’ve worked on a plugin which aims to implement the Supabase Javascript Library to Bubble. If you’ve worked with the Xano plugin by the amazing @eli the setup should be somewhat similar. Firstly here’s some links:

We’re planning to regularly update and push new functionalities in the future. A Few bullet points about the plugin:

  • It uses the Supabase Javascript Library meaning we’re only using Client-Side actions. It’s fast, secure and doesn’t use any Workload Unit.
  • You can self-host Supabase or host it in the cloud with several locations to choose from (both EU and US AWS servers)
  • Once you Create/Edit/Delete a new thing in your table, the plugin refreshes itself with the same query to get the latest data.
  • Supabase has quite a generous free plan and unlimited API calls.

We aim to work more on the following feature for the next iteration: MFA for Auth, better filtering & pagination for Data. Please try it out and let us you how it works :pray:

25 Likes

This is amazing :smiley: I have been looking for a way to get realtime data running on bubble properly. I guess this is what this does right? I’ll try to give it a try as soon as I fix my issue with WUs… :frowning:

2 Likes

:fire: Amazing work, @petersas! May actually spin up a supabase account to try this out. Quick read through the docs looks like they have a substantially more robust user management feature than Xano does?

1 Like

Nice work. We can take this off of our build list :white_check_mark:

1 Like

Yes, altough Supabase has a dedicated Realtime feature (that’s in progress too), this is basically runs the initial search you’ve setup, there’s also an action to manually refresh the Data if you wish.

Thank you @eli :pray: Although I haven’t gone super deep into Xano Auth, but Supabase has quite an awesome Auth and integrates super well with the Database and Storage part. You can really fine-tune the security rules in your Database based on the authenticated User.

With this plugin can I create a chat and have the messages updated in the bubble in real time?

You should. I’ve been knees deep in supabase. It feels really sexy but the learning curve is real. Learn sql. Use AI. Get sped the f up. Damn it’s nice. User management is real nice.

I think based on the response above, it would only update if the current user would reply. If the person on the other side would reply, the plugin would not refresh the data as it requires an action from the user to refresh the data.

Yes that’s right, you can manually refresh the data but it doesn’t yet listen to changes. I’m currently working on the Realtime feature, which would allow that.

1 Like

ok, we are waiting. This function will be very useful here at the agency where we work :pray:

1 Like

Hi. Do you have a target date for the release of this feature?

1 Like

Just subscribed and going through integration now. Can you please add LinkedIn Auth and the possibility for other SSO providers?

1 Like

Yes I’ll add LinkedIn and some other providers with the next update :+1:

There isn’t really a target date, but I’d also like to use Realtime myself so it’s a priority!

Awesome! Few more things:

  1. For the provider login, can you add the ability to add “scopes”? I want to retrieve the email and name for Google & LinkedIn log ins. Reference
  2. Is it possible to open the 3rd party auth in a new tab? Right now when I click the button to sign up with 3rd party, it shows a prompt from the browser that we are leaving the current page instead of just opening.
  3. How can I trigger the events? I tried using the “User signed up” event but it wasn’t triggered when signing up by email or by 3rd party.
1 Like
  1. We can add scopes, but email and name should already be available. With js you can already access them.
  2. Yes, I’ll add an option for it.
  3. “User signed up” should be triggered when you successfully sign up with an email. For the Social Login, all you need to have is the Auth element on a page where you redirect, and Supabase should automatically log you in when it sees the hash in the url. But for the rest you need to create your own login to track if this was the initial signup or not.

Nice work! Very excited to try it out!

[New Update 1.2.0]

  • “Data” now has Realtime functionality which listens to Database Changes, and refreshes the query. This uses the “Postgres Changes” realtime server which is done via Websockets. You can enable or disable Realtime with the checkbox, and it takes the initial filter into account, and also RLS. (Please don’t forget to check that your table has Realtime enabled, and also RLS is ok too). Here’s realtime in action, with two browser opened.
  • Added some more Auth providers for Oauth2
  • When you Update/Delete data via the Workflow you can now specify the Name and Value for the filter.

Next in line: Minor changes to Auth, Multiple filter option for Data & Large file Upload via TUS.

11 Likes

[New Update 1.3.0]

  • Few new Auth States: Registration Date, Last Sign in Date, Provider Token, Provider Refresh Token. If the User has successfully logged in via Social Login, the plugin tries to return the Access Token and Refresh Token of the Provider, for example for Google, so that you can make authorized calls to Google APIs (depending on scopes).
  • Scopes for Social Sign In. You can pass a space-separated list of text you want for scopes for the social login.
3 Likes

This is awesome! Is there way to upload multiple files at the same time?

Not yet, but currently in the works :wink: