This document provides detailed information about the server-side actions available in the Supabase plugin for Bubble.io.
Generate JWT (Custom auth)
Generates a JSON Web Token (JWT) that can be used for custom authentication with Supabase.
Fields:
Field | Description | Type | Required |
Secret | JWT secret used to sign your own JWTs. You can find it in your Supabase dashboard under Project Settings > API > JWT Settings. | Text | Yes |
Exp (expiration time) | Expiry time in seconds. Defaults to 3600 (1h). | Number | No |
Aud (audience) | Recipient for which the JWT is intended (e.g. authenticated). | Text | Yes |
Role | User role (e.g. anon, authenticated). | Text | Yes |
Sub (subject) | Optional. The subject of the JWT (the user). This value must be unique per user. | Text | No |
Email | Optional. User email | Text | No |
Payload | Custom JSON payload. This will be merged with other values. | Text | No |
Use UUID for the sub claim? | If true, derive a UUID from the sub value to ensure it is unique and conforms to UUID format (only when the sub value is not already a UUID). | Boolean | No |
Return Value:
Field | Description | Type |
JWT | The generated JWT token | Text |
Create user (Supabase admin)
Creates a new user in the Supabase authentication system using admin privileges.
Fields:
Field | Description | Type | Required |
Datatype | Select “Users - Admin (Supabase)” for this field. This type is automatically defined by the Supabase plugin and allows returning the user. | Custom Type | Yes |
Supabase URL | The URL of your Supabase project. | Text | Yes |
Service role key | The service role key. | Text | Yes |
Email | The user’s email. | Text | Yes |
Email confirm? | Confirms the user’s email address if set to true. | Boolean | Yes |
Password | The user’s password. | Text | No |
Phone | The user’s phone. | Text | No |
Phone confirm? | Confirms the user’s phone number if set to true. | Boolean | Yes |
Role | The “role” claim set in the user’s access token JWT. When a user signs up, this role is set to “authenticated” by default. You should only modify the “role” if you need to provision several levels of admin access that have different permissions on individual columns in your database. Setting this role to “service_role” is not recommended as it grants the user admin privileges. | Text | No |
Ban duration | Determines how long a user is banned for. The format for the ban duration follows a strict sequence of decimal numbers with a unit suffix. Valid time units are “ns”, “us” (or “µs”), “ms”, “s”, “m”, “h”. For example, some possible durations include: “300ms”, “2h45m”. Setting the ban duration to “none” lifts the ban on the user. | Text | No |
User metadata | A custom data object to store the user’s metadata. These will be automatically merged with the JSON user metadata field. (Stored in the raw_user_meta_data column of the auth.users table.) | Key-Value List | No |
User metadata (JSON) | A custom data object to store the user’s metadata. These will be automatically merged with the User metadata field. (Stored in the raw_user_meta_data column of the auth.users table.) | Text | No |
App metadata | A custom data object to store the user’s application specific metadata. These will be automatically merged with the JSON app metadata field. (Stored in the auth.users.app_metadata column of the auth.users table.) | Key-Value List | No |
App metadata (JSON) | A custom data object to store the user’s application specific metadata. These will be automatically merged with the app metadata field. (Stored in the auth.users.app_metadata column of the auth.users table.) | Text | No |
Return Values:
Field | Description | Type |
User | The created user | Custom Data |
Status message | Response message | Text |
Is success? | Whether the operation was successful | Boolean |
List users (Supabase admin)
Retrieves a list of users from the Supabase authentication system using admin privileges.
Fields:
Field | Description | Type | Required |
Datatype | Select “Users - Admin (Supabase)” for this field. This type is automatically defined by the Supabase plugin and allows returning the users. | Custom Type | Yes |
Supabase URL | The URL of your Supabase project. | Text | Yes |
Service role key | The service role key. | Text | Yes |
Page | The page number | Number | No |
Item per page | Number of items returned per page | Number | No |
Return Values:
Field | Description | Type |
Users | List of users | List of Custom Data |
Next page | Next page number | Number |
Last page | Last page number | Number |
Total | Total number of users | Number |
Status message | Response message | Text |
Is success? | Whether the operation was successful | Boolean |
Delete user (Supabase admin)
Deletes a user from the Supabase authentication system using admin privileges.
Fields:
Field | Description | Type | Required |
Supabase URL | The URL of your Supabase project. | Text | Yes |
Service role key | The service role key. | Text | Yes |
User ID | The user’s unique identifier | Text | Yes |
Soft delete? | If true, then the user will be soft-deleted (setting deleted_at to the current timestamp and disabling their account while preserving their data) from the auth schema. | Boolean | No |
Return Values:
Field | Description | Type |
Status message | Response message | Text |
Is success? | Whether the operation was successful | Boolean |
Get user (Supabase admin)
Retrieves a specific user from the Supabase authentication system using admin privileges.
Fields:
Field | Description | Type | Required |
Datatype | Select “Users - Admin (Supabase)” for this field. This type is automatically defined by the Supabase plugin and allows returning the user. | Custom Type | Yes |
Supabase URL | The URL of your Supabase project. | Text | Yes |
Service role key | The service role key. | Text | Yes |
User ID | The user’s unique identifier | Text | Yes |
Return Values:
Field | Description | Type |
User | The retrieved user | Custom Data |
Status message | Response message | Text |
Is success? | Whether the operation was successful | Boolean |
Update user (Supabase admin)
Updates a user in the Supabase authentication system using admin privileges.
Fields:
Field | Description | Type | Required |
Datatype | Select “Users - Admin (Supabase)” for this field. This type is automatically defined by the Supabase plugin and allows returning the user. | Custom Type | Yes |
Supabase URL | The URL of your Supabase project. | Text | Yes |
Service role key | The service role key. | Text | Yes |
User ID | The user’s ID. | Text | Yes |
User email | The user’s email. | Text | No |
Email confirm | Confirms the user’s email address if set to true. | Boolean | No |
Password | The user’s password. | Text | No |
Phone | The user’s phone. | Text | No |
Phone confirm? | Confirms the user’s phone number if set to true. | Boolean | No |
Role | The “role” claim set in the user’s access token JWT. When a user signs up, this role is set to “authenticated” by default. You should only modify the “role” if you need to provision several levels of admin access that have different permissions on individual columns in your database. Setting this role to “service_role” is not recommended as it grants the user admin privileges. | Text | No |
User metadata | A custom data object to store the user’s metadata. These will be automatically merged with the JSON user metadata field. (Stored in the raw_user_meta_data column of the auth.users table.) | Key-Value List | No |
User metadata (JSON) | A custom data object to store the user’s metadata. These will be automatically merged with the User metadata field. (Stored in the raw_user_meta_data column of the auth.users table.) | Text | No |
App metadata | A custom data object to store the user’s application specific metadata. These will be automatically merged with the JSON app metadata field. (Stored in the auth.users.app_metadata column of the auth.users table.) | Key-Value List | No |
App metadata (JSON) | A custom data object to store the user’s application specific metadata. These will be automatically merged with the app metadata field. (Stored in the auth.users.app_metadata column of the auth.users table.) | Text | No |
Return Values:
Field | Description | Type |
User | The updated user | Custom Data |
Status message | Response message | Text |
Is success? | Whether the operation was successful | Boolean |
Invite user by email (Supabase admin)
Sends an invitation email to a user to join your Supabase project.
Fields:
Field | Description | Type | Required |
Datatype | Select “Users - Admin (Supabase)” for this field. This type is automatically defined by the Supabase plugin and allows returning the user. | Custom Type | Yes |
Supabase URL | The URL of your Supabase project. | Text | Yes |
Service role key | The service role key. | Text | Yes |
Email | The user’s email. | Text | Yes |
User metadata | A custom data object to store the user’s metadata. These will be automatically merged with the JSON user metadata field. (Stored in the raw_user_meta_data column of the auth.users table.) | Key-Value List | No |
User metadata (JSON) | A custom data object to store the user’s metadata. These will be automatically merged with the User metadata field. (Stored in the raw_user_meta_data column of the auth.users table.) | Text | No |
Redirect to | The URL which will be appended to the email link sent to the user’s email address. Once clicked the user will end up on this URL. | Text | No |
Return Values:
Field | Description | Type |
User | The invited user | Custom Data |
Status message | Response message | Text |
Is success? | Whether the operation was successful | Boolean |
Generate an email link (Supabase admin)
Generates an email link for various authentication purposes.
Fields:
Field | Description | Type | Required |
Datatype | Select “Users - Admin (Supabase)” for this field. This type is automatically defined by the Supabase plugin and allows returning the user. | Custom Type | Yes |
Supabase URL | The URL of your Supabase project. | Text | Yes |
Service role key | The service role key. | Text | Yes |
Email | The user’s email. | Text | Yes |
Type | The type of email to send to user. | Dropdown (signup, invite, magiclink, recovery, email_change_current, email_change_new) | Yes |
Password | Only required if type is signup. | Text | No |
New email | Only required if type is email_change_current or email_change_new. | Text | No |
User metadata | A custom data object to store the user’s metadata. These will be automatically merged with the JSON user metadata field. (Stored in the raw_user_meta_data column of the auth.users table.) | Key-Value List | No |
JSON user metadata | A custom data object to store the user’s metadata. These will be automatically merged with the User metadata field. (Stored in the raw_user_meta_data column of the auth.users table.) | Text | No |
Redirect to | A redirect URL which will be appended to the generated email link. | Text | No |
Return Values:
Field | Description | Type |
User | The user for whom the link was generated | Custom Data |
Action link | The generated action link | Text |
Email OTP | The email OTP | Text |
Hashed token | The hashed token | Text |
Redirect to | The redirect URL | Text |
Verification type | The verification type | Text |
Status message | Response message | Text |
Is success? | Whether the operation was successful | Boolean |
Delete a factor for a user (Supabase admin)
Deletes a Multi-Factor Authentication (MFA) factor for a user.
Fields:
Field | Description | Type | Required |
Supabase URL | The URL of your Supabase project. | Text | Yes |
Service role key | The service role key. | Text | Yes |
Factor ID | ID of the MFA factor to delete. | Text | Yes |
User ID | ID of the user whose factor is being deleted. | Text | Yes |
Return Values:
Field | Description | Type |
Factor ID | The ID of the deleted factor | Text |
Status message | Response message | Text |
Is success? | Whether the operation was successful | Boolean |
List all projects (Supabase management)
Retrieves a list of all Supabase projects associated with your account.
Fields:
Field | Description | Type | Required |
Datatype | Select “Projects - Management (Supabase)” for this field. This type is automatically defined by the Supabase plugin. | Custom Type | Yes |
Access token | Supabase access token | Text | Yes |
Return Values:
Field | Description | Type |
Projects | List of projects | List of Custom Data |
Status message | Response message | Text |
Is success? | Whether the operation was successful | Boolean |
Create a project (Supabase management)
Creates a new Supabase project.
Fields:
Field | Description | Type | Required |
Datatype | Select “Projects - Management (Supabase)” for this field. This type is automatically defined by the Supabase plugin. | Custom Type | Yes |
Access token | Supabase access token | Text | Yes |
DB password | Database password | Text | Yes |
Name | Name of your project, should not contain dots. | Text | Yes |
Organization ID | Slug of your organization. | Text | Yes |
Region | Region you want your server to reside in. | Dropdown | Yes |
Instance size | The instance size. | Dropdown | Yes |
Template URL | Template URL used to create the project. | Text | No |
Return Values:
Field | Description | Type |
Project | The created project | Custom Data |
Status message | Response message | Text |
Is success? | Whether the operation was successful | Boolean |
Run SQL query (Supabase management)
Executes a SQL query on your Supabase database.
Fields:
Field | Description | Type | Required |
Datatype | Optional. Data type that you have initialized through the API connector. | Custom Type | No |
Expected response (JSON) | Optional. This schema should match the one you have already entered in the API connector. | Text | No |
Access token | Supabase access token | Text | Yes |
Project ref | Supabase project ID | Text | Yes |
SQL query | SQL query | Text | Yes |
Return Values:
Field | Description | Type |
Result (JSON) | The query results as structured data | List of Custom Data |
Result | The query results as a text string | Text |
Status message | Response message | Text |
Is success? | Whether the operation was successful | Boolean |