mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 20:35:07 +03:00
fix format
This commit is contained in:
1 parent
a5cbe51dff
commit
3bf4dfaef7
1 file changed
+3
-5
@@ -457,11 +457,9 @@ async function authMiddleware(c: Context, next: Next) {
|
||||
|
||||
const [scheme, token] = authHeader.split(' ')
|
||||
if (scheme?.toLowerCase() !== 'bearer' || !token) {
|
||||
return c.json(
|
||||
{ error: 'invalid_request', error_description: 'Bearer token required' },
|
||||
401,
|
||||
{ 'WWW-Authenticate': buildWwwAuthenticateHeader(c, 'invalid_request', 'Bearer token required') }
|
||||
)
|
||||
return c.json({ error: 'invalid_request', error_description: 'Bearer token required' }, 401, {
|
||||
'WWW-Authenticate': buildWwwAuthenticateHeader(c, 'invalid_request', 'Bearer token required'),
|
||||
})
|
||||
}
|
||||
|
||||
const { valid, user, error } = await validateToken(c, token)
|
||||
|
||||
Reference in new issue
Block a user