Supabase.js (Bubble plugin)
  • Setup
    • Basic Setup
      • General notes on Bubble setup
    • Supabase Auth
      • Initializing Auth
      • How to: Login
      • How to: Sign Up
      • How to: MFA
      • Identity linking
    • Supabase Data
      • How to: Fetch Data
      • Data Realtime V2 (beta)
      • Foreign Table
      • How to: Create a Thing
      • How to: Update a thing
      • How to: Delete a thing
      • Data Realtime
      • Optimization Tips
      • Schema Validation
      • Create XML Sitemap
    • Supabase Storage
    • Supabase Realtime
    • Supabase Edge Functions
      • Basic Edge Function
      • Bubble Setup
Powered by GitBook
On this page
  • Element States
  • Actions
  1. Setup

Supabase Auth

Element States

The Auth element comes with a few states you can reference in your app in order to know the status of the Current User. All these states are always automatically updated either on page load, or after an action

  • isLoggedin (Boolean): To know if the User has authenticated or not.

  • Access Token (Text): This is needed for every call to Supabase.

  • Refresh Token (Text): Refresh Token to refresh the session when expired.

  • Email (Text): Email address of the authenticated User

  • UID (Text): UUID of the Current User

  • Provider (Text): How the user was signed up. For example: Email, Google, Facebook etc

  • Error (Text): If there's any error, you can reference this state, which will be the error message Supabase returns. Use it with the Event "Unhandled error happened".

  • Registration Date: When the User was created.

  • Last Sign in Date: Last time the User has authenticated.

  • Provider Token: When using Oauth2 the plugin tries to return the Token of the Social Login provider.

  • Provider Refresh Token: When using Oauth2 the plugin tries to return the Refresh Token of the Social Login provider.

Actions

Sign Up

Signs up the User. An Email address and Password Required.

Log in

Log the User in. An Email address and Password Required.

Log out

Logs out the User, and destroys the session.

Sign in through OAuth

  • Scopes: Add them as a Space-separated list of text. For sensitive scopes you might need to got through a verification process.

Update User's Password

Updates the password for the authenticated User

Update User's Email

Updates the email for the authenticated User

Send Password Reset Email

Sign in via OTP

Signs in the user via a One Time Password.

Update User's Metadata

Updates the User's Metadata on the auth.user table. This is an advanced action. We recommend creating a separate public table for User settings and details, and setup proper Row Level Security.

PreviousGeneral notes on Bubble setupNextInitializing Auth

Last updated 7 months ago

Sign in the User via one of your enabled Social Provider. Follow Supabase's guides on how to setup the relevant connections:

Sends an email to the user to Reset the password. This action will log the user in with the link. Use the action to reset the password.

https://supabase.com/docs/guides/auth/social-login
Update User's Password