appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.63k stars 3.74k forks source link

[Feature]: Add Supabase as "Saas Integrations" data source #25868

Open thorwebdev opened 1 year ago

thorwebdev commented 1 year ago

Is there an existing issue for this?

Summary

Supabase now provides an OAuth2 flow that allows you to retrieve an access_token to manage the user's Supabase project's on their behalf.

We'd love for you to add this as an option to the "Saas Integrations" to allow users to connect their supabase account with one click, select an existing or create a new project and automatically set the postgres connection string.

Recommended Supabase OAuth Flow

  1. User clicks "Connect Supabase" button in the "Datasources in your workspace" > "Saas Integrations" section
  2. User gets redirected to Supabase to authorize appsmith to connect to their account
  3. User gets redirected back, appsmith finishes Oauth2 connection and get an access_token for the user
  4. Appsmith uses the management API to show the user a list of their project (https://api.supabase.com/api/v1#/projects/getProjects)
    1. User selects existing project, appsmith asks user for DB password and with that constructs the DB connections string to connect to their postgres database.
  5. Alternatively, user can select "Create new project"
    1. Appsmith uses the management API to create a new project: https://api.supabase.com/api/v1#/projects/createProject
    2. In this case appsmith generates the DB password and uses it to programmatically construct the DB URI to connect to the user's newly created prostgres DB.

image

Why should this be worked on?

This will allow appsmith users to set up a Postgres DB with just a few clicks, making it even easier for them to get up and running.

Nikhil-Nandagopal commented 1 year ago

@thorwebdev what would be the difference between using the postgres connection flow to connect to supabase and this OAuth flow?

thorwebdev commented 1 year ago

The difference is that users wouldn't need to manually copy over their DB credentials. And also that you would be able to create new projects/databases on their behalf.

Nikhil-Nandagopal commented 1 year ago

@thorwebdev thanks for clearing that up, I'm re-opening this issue

cassidoo commented 4 months ago

Kind of a late +1 to this, I'd love to see the integration!