go_true_redux

Crates.iogo_true_redux
lib.rsgo_true_redux
version0.2.2
sourcesrc
created_at2023-07-09 18:34:16.932764
updated_at2023-07-10 22:49:26.796313
descriptionGoTrue client written in rust
homepagehttps://github.com/j7nw4r/gotrue-rs-redux
repositoryhttps://github.com/j7nw4r/gotrue-rs-redux
max_upload_size
id912256
size62,584
Johnathan W (j7nw4r)

documentation

README

gotrue-rs-redux

:exclamation: 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.

Commit count: 133

cargo fmt