#supabase #authentication #supabase-js

supabase-js-rs

Rust bindings for Supabase JavaScript library via WebAssembly

3 releases

0.1.2 Jan 20, 2023
0.1.1 Jan 11, 2023
0.1.0 Dec 18, 2022

#535 in WebAssembly

27 downloads per month

MIT/Apache

24KB
218 lines

supabase-js-rs

Rust bindings for Supabase JavaScript library via WebAssembly.

Usage

Add supabase-js-rs to Cargo.toml

supabase-js-rs = { version = "0.1.1" }
wasm-bindgen = "0.2.83"

Install @supabase/supabase-js as package by adding CDN link to index.html in the root of your crate

<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>

Build and run

trunk serve

Examples

What I've done so far

  • Auth
    • Create a new user
    • Sign in a user
    • Sign in a user through OTP
    • Sign in a user through OAuth
    • Sign out a user
    • Verify and log in through OTP
    • Retrieve a session
    • Retrieve a new session
    • Retrieve a user
    • Update a user
    • Set the session data
    • Listen to auth events
    • Send a password reset request
    • Enroll a factor
    • Create a challenge
    • Verify a challenge
    • Create and verify a challenge
    • Unenroll a factor
    • Get Authenticator Assurance Level
  • Database
    • Fetch data
    • Insert data
    • Update data
    • Upsert data
    • Delete data
    • Call a Postgres function
    • Using filters
    • Using Modifiers
  • Functions
  • Realtime
  • Storage

Dependencies

~1–2.8MB
~52K SLoC