this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

app: whitelist sign in

Clément 5e1dac20 5573ff11

+15 -2
+7
app/migrations/0004_sigin_whitelist.sql
··· 1 + alter table "user" 2 + add column "whitelisted" 3 + boolean not null default false; 4 + 5 + insert into "user" ("did", "whitelisted") 6 + values ('did:plc:pj5vgcebbi6shqj6zapminia', true) 7 + on conflict ("did") do update set "whitelisted" = true;
+3 -2
app/prisma/schema.prisma
··· 9 9 } 10 10 11 11 model User { 12 - did String @id // This has to be validated as a correctly formated DID 13 - sessions Session[] 12 + did String @id // This has to be validated as a correctly formated DID 13 + sessions Session[] 14 + whitelisted Boolean @default(false) 14 15 } 15 16 16 17 model Session {
+1
app/src/contexts/auth.tsx
··· 25 25 26 26 const user = await prisma.user.findFirst({ 27 27 where: { 28 + whitelisted: true, 28 29 sessions: { some: { token: session.data.token } }, 29 30 }, 30 31 });
+4
app/src/lib/header/SignInDialog.tsx
··· 71 71 }} 72 72 children={(field) => ( 73 73 <label class="flex flex-col"> 74 + <p class="mb-2 text-red-500"> 75 + disclaimer: the access is currently in whitelist-only mode. 76 + you might not be able to connect 77 + </p> 74 78 <span class="select-none">handle:</span> 75 79 <input 76 80 ref={handleInputRef}