3 unstable releases

0.2.2 Jul 10, 2023
0.2.1 Jul 10, 2023
0.2.0 Jul 10, 2023
0.1.1 Jul 9, 2023

#2069 in Development tools

MIT license

41KB
630 lines

gotrue-rs-redux

❗ This is a fork of Fubinator's gotrue-rs. While functionally similar, it has breaking API changes and a more expansive documentation. Credit is given to Fubinator for a vast majority of the development.

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_redux = "0.2.2"

Examples

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

use go_true_redux::Client;

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

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

    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–16MB
~222K SLoC