2 releases

0.1.1 Jul 23, 2022
0.1.0 Jul 2, 2022

#1786 in Development tools

Download history 4/week @ 2024-02-15 11/week @ 2024-02-22 6/week @ 2024-02-29 13/week @ 2024-03-07 13/week @ 2024-03-14 10/week @ 2024-03-21 42/week @ 2024-03-28 32/week @ 2024-04-04

100 downloads per month
Used in 2 crates

MIT license

40KB
625 lines

gotrue-rs

Rust Crate License: MIT

This is a GoTrue client implementation in rust. The library is currently under development. Most of the features are already built in, but there are still some changes to be made and everything still needs to be documented.

Usage

Add the following line to your Cargo.toml:

go_true = "0.1.1"

Examples

To create an account, create a new client and execute the sign_up function with email and password:

use go_true::Client;

#[tokio::main]
async fn main() {
    let url = "http://localhost:9998".to_string();
    let mut client = Client::new(url);

    let email = "email@example.com".to_string();
    let password = "Abcd1234!".to_string();

    let session = client.sign_up(&email, &password).await;

    println!("{:?}", session);
}

For more information, check out the API docs!

Testing

The first thing to do is to start the supabase server in docker:

cd infra
docker compose up

Once the server has been started, the tests can be run:

cargo test --tests

Contributing

Contributions, issues and feature requests are welcome. Feel free to check out the issues page if you want to contribute.

Dependencies

~4–18MB
~256K SLoC