From 325b0b15668e80583788c283afd7253d5184cf23 Mon Sep 17 00:00:00 2001 From: "Shaun A. Noordin" Date: Fri, 11 Oct 2024 16:24:46 +0100 Subject: [PATCH] ExperimentalAuth: setup skeleton for signIn() --- packages/lib-panoptes-js/dev/index.html | 2 +- packages/lib-panoptes-js/dev/index.js | 5 ++--- packages/lib-panoptes-js/src/experimental-auth.js | 5 +++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/lib-panoptes-js/dev/index.html b/packages/lib-panoptes-js/dev/index.html index 94d028e9284..7f3fc8c7794 100644 --- a/packages/lib-panoptes-js/dev/index.html +++ b/packages/lib-panoptes-js/dev/index.html @@ -20,7 +20,7 @@

Panoptes.js dev app

id="login-form" method="POST" > - +

diff --git a/packages/lib-panoptes-js/dev/index.js b/packages/lib-panoptes-js/dev/index.js index 995b90b27d1..626d55063d9 100644 --- a/packages/lib-panoptes-js/dev/index.js +++ b/packages/lib-panoptes-js/dev/index.js @@ -10,10 +10,9 @@ class App { } loginForm_onSubmit (e) { - console.log('+++ loginForm_onSubmit', e) + const formData = new FormData(e.target) + signIn(formData.get('login'), formData.get('password')) - experimentalAuth.signIn() - e.preventDefault() return false } diff --git a/packages/lib-panoptes-js/src/experimental-auth.js b/packages/lib-panoptes-js/src/experimental-auth.js index e8ef9a1f681..d83b1e771c8 100644 --- a/packages/lib-panoptes-js/src/experimental-auth.js +++ b/packages/lib-panoptes-js/src/experimental-auth.js @@ -62,8 +62,9 @@ function broadcastEvent (eventType, args, _store) { }) } -function signIn () { - console.log('1234') +function signIn (login, password) { + // TODO + console.log('+++ experimental auth client: signIn() ', login, password) } export {