refactor: fix password auth

refactor: move tabs around
This commit is contained in:
Andy Burke 2025-07-23 13:01:52 -07:00
parent 316663be32
commit e397bc884b
17 changed files with 49 additions and 26 deletions

View file

@ -79,7 +79,7 @@ export async function POST(req: Request, meta: Record<string, any>): Promise<Res
});
}
const verified = await bcrypt.compare(`${password_hash}${password_entry.salt}`, password_entry.hash);
const verified = await bcrypt.compare(password_hash, password_entry.hash);
if (!verified) {
return Response.json({

View file

@ -106,13 +106,12 @@ export async function POST(req: Request, meta: Record<string, any>): Promise<Res
await USERS.create(user);
const salt = await bcrypt.genSalt();
const hashed_password_value = await bcrypt.hash(password_hash, salt);
// automatically salted
const hashed_password_value = await bcrypt.hash(password_hash);
const password_entry: PASSWORD_ENTRY = {
user_id: user.id,
hash: hashed_password_value,
salt,
timestamps: {
created: now,
updated: now

View file

@ -0,0 +1,3 @@
# calendar
The calendar should help people coordinate events.

View file

@ -10,5 +10,7 @@
><div class="icon calendar"></div>
<div class="label">Calendar</div></label
>
<div class="tab-content">This is the calendar tab.</div>
<div class="tab-content">
<!-- #include file="./README.md" -->
</div>
</div>

View file

@ -0,0 +1,3 @@
# exchange
The exchange should help people find goods and trade.

View file

@ -10,5 +10,7 @@
><div class="icon exchange"></div>
<div class="label">Exchange</div></label
>
<div class="tab-content">This is the exchange tab.</div>
<div class="tab-content">
<!-- #include file="./README.md" -->
</div>
</div>

View file

@ -0,0 +1,3 @@
# Home
This tab should show notifications and an overview.

View file

@ -11,5 +11,7 @@
<div class="icon home"></div>
<div class="label">Home</div>
</label>
<div class="tab-content">This is the home tab.</div>
<div class="tab-content">
<!-- #include file="./README.md" -->
</div>
</div>

View file

@ -0,0 +1,3 @@
# Resources
Resources should be a wiki for organizing community knowledge.

View file

@ -10,5 +10,5 @@
><div class="icon resources"></div>
<div class="label">Resources</div></label
>
<div class="tab-content">This is the resources tab.</div>
<div class="tab-content"><!-- #include file="./README.md" --></div>
</div>

View file

@ -126,11 +126,11 @@
</style>
<div class="tabs">
<!-- #include file="./home.html" -->
<!-- #include file="./home/home.html" -->
<!-- #include file="./talk/talk.html" -->
<!-- #include file="./exchange.html" -->
<!-- #include file="./work.html" -->
<!-- #include file="./resources.html" -->
<!-- #include file="./calendar.html" -->
<!-- #include file="./profile.html" -->
<!-- #include file="./exchange/exchange.html" -->
<!-- #include file="./resources/resources.html" -->
<!-- #include file="./calendar/calendar.html" -->
<!-- #include file="./work/work.html" -->
<!-- #include file="./profile/profile.html" -->
</div>

View file

@ -0,0 +1,8 @@
# Work
This tab should help people find and list work, but without being shitty:
- Make requirements favor users
- Salary required
- Location required
- Discussions available on listings without poster's control

View file

@ -10,5 +10,5 @@
><div class="icon work"></div>
<div class="label">Work</div>
</label>
<div class="tab-content">This is the work tab.</div>
<div class="tab-content"><!-- #include file="./README.md" --></div>
</div>