feature/gresiq-v1
claude/smbcloud-github-app-k9641p
development
feature/apps
feature/build-release
feature/ci-docs
feature/ci-ruby-gems
feature/cicd
feature/completion
feature/dist-nuget
feature/fix-ci-sdk-pypi-rubygem
feature/fix-clippy-on-stable-channel
feature/fix-deployment-script
feature/github-email
feature/gresiq-v1
feature/project-new-structure
feature/rsync-deploy
feature/ruby-runner
feature/sdk-npm
feature/sdk-workflows
feature/smbcloud-cli-release-npm
feature/smbcloud-deploy
feature/wasm
main
release/v0.7.4
| 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 | ``` |