From 634d3097666c18aed1a7486a2708d545e22ade2c Mon Sep 17 00:00:00 2001 From: nazeh Date: Mon, 2 Sep 2024 17:05:06 +0300 Subject: [PATCH] examples(authz): test thirdPartySignin() --- Cargo.lock | 2 + examples/authz/3rd-party-app/index.html | 2 +- .../3rd-party-app/src/pubky-auth-widget.js | 44 ++++++++++++- examples/authz/authenticator/Cargo.toml | 1 + examples/authz/authenticator/src/main.rs | 62 ++++++++++++------- pubky-common/src/auth.rs | 10 ++- pubky-homeserver/src/routes/auth.rs | 2 + pubky/Cargo.toml | 1 + pubky/pkg/test/auth.js | 4 ++ pubky/src/error.rs | 3 + pubky/src/shared/auth.rs | 51 +++++++++++++-- pubky/src/wasm.rs | 28 ++++++++- 12 files changed, 171 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cf9bfbe..abf383f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -140,6 +140,7 @@ name = "authenticator" version = "0.1.0" dependencies = [ "anyhow", + "base64 0.22.1", "clap", "pubky", "pubky-common", @@ -1511,6 +1512,7 @@ checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" name = "pubky" version = "0.1.0" dependencies = [ + "base64 0.22.1", "bytes", "js-sys", "pkarr", diff --git a/examples/authz/3rd-party-app/index.html b/examples/authz/3rd-party-app/index.html index 3eafca8..1249852 100644 --- a/examples/authz/3rd-party-app/index.html +++ b/examples/authz/3rd-party-app/index.html @@ -4,7 +4,7 @@ - Vite + Lit + Pubky Auth Demo