1 # smbcloud-auth-wasm
2
3 Wasm bindings for the smbCloud Auth SDK.
4
5 This crate is intended to be published as an npm package via `wasm-pack` and
6 consumed by browser clients that need tenant auth-app signup, sign-in, profile
7 lookup, and account deletion against the smbCloud Auth service.
8
9 ## Exports
10
11 - `signup_with_client`
12 - `login_with_client`
13 - `logout_with_client`
14 - `me_with_client`
15 - `remove_with_client`
16 - `Environment`
17
18 ## Build
19
20 ```bash
21 wasm-pack build --target web --release
22 ```
23
24 ## Browser usage
25
26 ```js
27 import init, {
28 Environment,
29 login_with_client,
30 signup_with_client,
31 } from "smbcloud-auth-wasm";
32
33 await init();
34
35 await signup_with_client(
36 Environment.Production,
37 "app-id",
38 "app-secret",
39 "name@example.com",
40 "password123",
41 );
42 ```