/Wiki/sources/honojs__hono/2026/https-raw-githubusercontent-com-honojs-hono-main-1abd53ca1105-basic-auth-middleware-and-bearer-auth-middleware-s0017-c0000.md

Basic Auth Middleware and Bearer Auth Middleware - hono-docs

Basic Auth Middleware and Bearer Auth Middleware Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://raw.githubusercontent.c...

Basic Auth Middleware and Bearer Auth Middleware

Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://raw.githubusercontent.com/honojs/hono/main/docs/MIGRATION.md#basic-auth-middleware-and-bearer-auth-middleware

Summary

If you are using Basic Auth and Bearer Auth in your Handler (nested), change as follows: ```ts app.use('/auth/*', async (c, next) => { const auth = basicAuth({ username: c.env.USERNAME, password: c.env.PASSWORD }) return auth(c, next) //...

Content

If you are using Basic Auth and Bearer Auth in your Handler (nested), change as follows:

app.use('/auth/*', async (c, next) => {
  const auth = basicAuth({ username: c.env.USERNAME, password: c.env.PASSWORD })
  return auth(c, next) // Older: `await auth(c, next)`
})
Kinic Wiki
Loading knowledge node
Details

Identity

database
db_23dhmsxlhukv
database_id
db_23dhmsxlhukv
path
/Wiki/sources/honojs__hono/2026/https-raw-githubusercontent-com-honojs-hono-main-1abd53ca1105-basic-auth-middleware-and-bearer-auth-middleware-s0017-c0000.md
kind
directory
role
markdown_note
children
0

Metadata

created_at
virtual
updated_at
virtual
etag
virtual
metadata_json
{}

Lint Hints

No lightweight warnings.

Outgoing Links

No outgoing links indexed.

Incoming Links

Select a file node to inspect backlinks.

Raw Source

No raw source path inferred.