-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: discuss value of Next.js middleware #418
Comments
First of all, congratulations on your job well done! I've been using it successfully for over a year. Source: https://vercel.com/docs/concepts/functions/edge-functions#unsupported-apis |
Is that correct? It reads that only native Node.js APIs aren't supported. From docs:
That aside, there's not a clear use case for needing middleware yet. This thread has been quiet. |
The problem seems to be the fs module used by the Firebase Admin SDK |
I saw the addition of the recent I see that getUserFromCookies is still using the admin SDK, but only if
this way we can use |
@abusada That's a good idea and should be a pretty simple first step. On top of that, we can probably support the same behavior as |
yes, that sounds great, I would gladly prepare a pull request with the changes, I'll try to have one ready by the end of the week |
Ended up here when researching the possibility of doing simple JWT verification in an edge middleware and redirecting end-user to |
@trymbill Not yet. PR welcome for this! |
Hey, any news about this? I'd like to call some protected apis from the middleware and I need a token for that. Thanks |
Would love to get my auth code working on the edge. |
Next.js supports middleware, which this library could recommend as a way to integrate with
next-firebase-auth
. I'd like to gather input on whether middleware provides value that the current API (withAuthUser
andwithAuthUserTokenSSR
) does not.My initial assessment is that middleware usage could be a good option for apps where auth info is needed on many or all pages and the server-side auth/redirect settings don't change between pages. In this scenario, middleware could provide an AuthUser on the request object in
getServerSideProps
or redirect as needed.However:
Feedback and input appreciated!
The text was updated successfully, but these errors were encountered: