Crate go_true_redux
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.
Structs
- Represents the API of Gotrue.
- Represents a client used to interact with a Gotrue Server.
- Represents user attributes used in updating a user.
Enums
- Represent either an email or phone number for OTP.
- Represents a error returned from a user action by GoTrue.