nextauthjs / next-auth

Authentication for the Web.
https://authjs.dev
ISC License
22.9k stars 3.09k forks source link

Update firebase.mdx #10820

Closed royce-mathew closed 1 month ago

royce-mathew commented 1 month ago

☕️ Reasoning

When trying to call the auth function anywhere inside middleware.tsx, the following issue is encountered.

Module build failed: UnhandledSchemeError: Reading from "node:stream" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
Import trace for requested module:
node:stream
./node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js
./node_modules/.pnpm/firebase-admin@12.1.0/node_modules/firebase-admin/lib/utils/api-request.js
./node_modules/.pnpm/firebase-admin@12.1.0/node_modules/firebase-admin/lib/app/credential-internal.js
./node_modules/.pnpm/firebase-admin@12.1.0/node_modules/firebase-admin/lib/utils/index.js
./node_modules/.pnpm/firebase-admin@12.1.0/node_modules/firebase-admin/lib/app/index.js
./node_modules/.pnpm/firebase-admin@12.1.0/node_modules/firebase-admin/lib/esm/app/index.js
./node_modules/.pnpm/@auth+firebase-adapter@2.0.0_firebase-admin@12.1.0/node_modules/@auth/firebase-adapter/index.js
./src/lib/auth.ts

There should be a warning on the adapter's page displaying that it is not compatible with middleware.

🧢 Checklist

🎫 Affected issues

https://github.com/nextauthjs/next-auth/issues/10819

📌 Resources

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 5, 2024 5:10am
1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **next-auth-docs** | ⬜️ Ignored ([Inspect](https://vercel.com/authjs/next-auth-docs/5Bf6pU2SCU648FoV84tuffcZsK9U)) | [Visit Preview](https://next-auth-docs-git-fork-royce-mathew-patch-2-authjs.vercel.app) | | May 5, 2024 5:10am |
vercel[bot] commented 1 month ago

@royce-mathew is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

ndom91 commented 1 month ago

Thanks for your interest, but I think we're not going to accept this change, it would set a bad precedent for us documenting all sorts of things for the database and hosting provider itself.

Folks should know whether their database is edge-comaptible or not when using one of those deployment platforms (Vercel, Cloudflare, etc.). We can't be the documentation for the adapter and the hosting provider as well.