1 <!-- LOGO -->
2 <h1>
3 <p align="center">
4 <img src="https://avatars.githubusercontent.com/u/89791739?s=200&v=4" alt="Logo" width="128">
5 <br>smbCloud SDK Auth
6 </h1>
7 <p align="center">
8 Browser auth SDK for smbCloud.
9 <br />
10 <a href="README.md#about">About</a>
11 ·
12 <a href="README.md#install">Install</a>
13 ·
14 <a href="README.md#usage">Usage</a>
15 ·
16 <a href="README.md#license">License</a>
17 </p>
18 </p>
19
20 ## About
21
22 `@smbcloud/sdk-auth` is the browser SDK for smbCloud Auth. It wraps the shared Rust auth crate through WebAssembly so browser apps can use the same auth API as other smbCloud clients.
23
24 Current exported browser APIs include:
25
26 - `signup_with_client`
27 - `login_with_client`
28 - `logout_with_client`
29 - `me_with_client`
30 - `remove_with_client`
31 - `Environment`
32
33 ## Install
34
35 ```bash
36 npm install @smbcloud/sdk-auth
37 ```
38
39 ## Usage
40
41 ```js
42 import init, {
43 Environment,
44 login_with_client,
45 signup_with_client,
46 } from "@smbcloud/sdk-auth";
47
48 await init();
49
50 await signup_with_client(
51 Environment.Production,
52 "app-id",
53 "app-secret",
54 "name@example.com",
55 "password123",
56 );
57 ```
58
59 ## Local packaging
60
61 From `sdk/npm/smbcloud-auth`:
62
63 ```bash
64 npm run prepare:package
65 npm run pack:dry-run
66 ```
67
68 This builds the wasm crate, stages the generated artifacts into the npm package folder, and lets you check the publish payload before release.
69
70 More browser and platform docs live in the [smbCloud developer docs](https://smbcloud.xyz/posts).
71
72 ## License
73
74 Apache-2.0
75
76 ## Copyright
77
78 © 2026 [Splitfire AB](https://5mb.app) ([smbCloud](https://smbcloud.xyz)).