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 | use smbcloud_auth::client_credentials::ClientCredentials; |
| 2 | use smbcloud_network::environment::Environment; |
| 3 | use wasm_bindgen::JsValue; |
| 4 | use wasm_bindgen::prelude::wasm_bindgen; |
| 5 | |
| 6 | #[wasm_bindgen] |
| 7 | pub async fn me_with_client( |
| 8 | env: Environment, |
| 9 | app_id: String, |
| 10 | app_secret: String, |
| 11 | access_token: String, |
| 12 | ) -> Result<JsValue, JsValue> { |
| 13 | let client = ClientCredentials { |
| 14 | app_id: &app_id, |
| 15 | app_secret: &app_secret, |
| 16 | }; |
| 17 | |
| 18 | match smbcloud_auth::me::me_with_client(env, client, &access_token).await { |
| 19 | Ok(response) => Ok(serde_wasm_bindgen::to_value(&response)?), |
| 20 | Err(error) => Err(serde_wasm_bindgen::to_value(&error)?), |
| 21 | } |
| 22 | } |