mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-09 07:01:27 -07:00
authentication improvements
This commit is contained in:
@@ -55,7 +55,7 @@ async function authedId(c: Context<App>): Promise<number | null> {
|
||||
if (!authHeader.toLowerCase().startsWith('bearer ')) return null
|
||||
|
||||
const token = authHeader.slice('Bearer '.length)
|
||||
const accountId = await validateAndGetAccountId(token)
|
||||
const accountId = await validateAndGetAccountId(token, await c.env.JWT_SECRET.get())
|
||||
if (!accountId) return null
|
||||
|
||||
const id = Number.parseInt(accountId, 10)
|
||||
|
||||
Reference in New Issue
Block a user