Crate go_true

Source
Expand description

§go_true

GoTrue client-side library.

§Usage

Add the following line to your Cargo.toml:

go_true = "0.1.0"

§Examples

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

use go_true::{Client, EmailOrPhone};

#[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(EmailOrPhone::Email(email), &password).await;

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

Check out the README for more info.

Modules§

error

Structs§

Api
Client
UserAttributes

Enums§

EmailOrPhone