+3
-3
src/lib/atproto.ts
+3
-3
src/lib/atproto.ts
···
72
72
stateStore: new AuthStateStore(db),
73
73
sessionStore: new AuthSessionStore(db),
74
74
clientMetadata: {
75
-
client_name: "potatonet-app",
75
+
client_name: "easytodo.link",
76
76
client_id: !dev ? `${publicUrl}/client-metadata.json`
77
77
: `http://localhost?redirect_uri=${
78
78
encodeURIComponent(`${url}/oauth/callback`)
79
79
}&scope=${
80
-
encodeURIComponent(`atproto transition:generic`)
80
+
encodeURIComponent(`atproto repo:link.easytodo.tasks.list repo:link.easytodo.tasks.task`)
81
81
}`,
82
82
client_uri: url,
83
83
redirect_uris: [`${url}/oauth/callback`],
84
-
scope: "atproto transition:generic",
84
+
scope: "atproto repo:link.easytodo.tasks.list repo:link.easytodo.tasks.task",
85
85
grant_types: ["authorization_code", "refresh_token"],
86
86
application_type: "web",
87
87
token_endpoint_auth_method: "none",
+9
-7
src/routes/+layout.svelte
+9
-7
src/routes/+layout.svelte
···
36
36
{@render children()}
37
37
</section>
38
38
39
-
<dialog bind:this={loginDialog} class="bg-white">
40
-
<h1>Login with ATProto</h1>
41
-
<button onclick={() => loginDialog?.close()}>Close</button>
42
-
<form method="POST" action="/?/login">
43
-
<input name="handle" type="text" placeholder="zeu.dev" />
44
-
<button type="submit">Login</button>
39
+
<dialog bind:this={loginDialog} class="bg-white top-1/2 left-1/2 -translate-1/2 p-4 rounded">
40
+
<span class="flex items-center gap-4 self-end">
41
+
<h1 class="text-xl font-bold">Login with ATProto</h1>
42
+
<button onclick={() => loginDialog?.close()} class="bg-gray-100 px-3 py-2 rounded self-end">Close</button>
43
+
</span>
44
+
<form method="POST" action="/?/login" class="flex flex-col gap-4">
45
+
<input name="handle" type="text" placeholder="zeu.dev" class="border rounded px-4 py-2" />
46
+
<button type="submit" class="border px-3 py-2 rounded">Login</button>
45
47
</form>
46
48
</dialog>
47
49
48
-
<dialog bind:this={accountDialog} class="bg-white">
50
+
<dialog bind:this={accountDialog} class="bg-white p-6 shadow top-1/2 left-1/2 -translate-1/2">
49
51
<h1>Account</h1>
50
52
<button onclick={() => accountDialog?.close()}>Close</button>
51
53
<form method="POST" action="/?/logout">
+1
-1
src/routes/+page.server.ts
+1
-1
src/routes/+page.server.ts