aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-07-28 21:22:25 -0700
committerAdam Soltys <[email protected]>2022-07-28 21:22:50 -0700
commit81a073638e03f57abd9016ce246940e602e8366d (patch)
treeb4dffb2a5e4e23f7ee9b1fd5cb5804f9b741590c /src/components
parent0dfe39f9039bebd123369f0d8e7b7f80a6807c9f (diff)
downloadcoinos-ui-81a073638e03f57abd9016ce246940e602e8366d.tar.gz
coinos-ui-81a073638e03f57abd9016ce246940e602e8366d.zip
save token in cookie
Diffstat (limited to 'src/components')
-rw-r--r--src/components/RegisterOrLogin.svelte4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/RegisterOrLogin.svelte b/src/components/RegisterOrLogin.svelte
index 6cae8b5a..2334741d 100644
--- a/src/components/RegisterOrLogin.svelte
+++ b/src/components/RegisterOrLogin.svelte
@@ -7,7 +7,7 @@
export let page;
- let username, password;
+ let username = "bob", password = "pw";
let revealPassword = false;
@@ -20,6 +20,7 @@
let r = await post(url, { username, password });
if (!r.token) r = await post('/login', { username, password });
$token = r.token;
+ console.log("new token", r.token)
auth();
goto('/receive');
};
@@ -42,6 +43,7 @@
required
class="bg-primary p-4 rounded-2xl w-full"
bind:value={username}
+ autofocus
/>
</div>