Basic Auth

Adds basic auth support to Next.js project using the official middleware approach.


  • Visit : /fr/admin/features
  • Enable shield
  • Setup your Credentials using a user and a password.
  • Paths is optional but you can use it to only apply basic auth to those paths, patterns used should match https://www.npmjs.com/package/path-to-regexp. By default it will apply basic auth to all requests with a few exceptions.

⚠️
Due to the nature of NextJs, this feature only works in hard navigations and not soft ones using Next Router to navigate between pages.