-
Notifications
You must be signed in to change notification settings - Fork 410
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
v4: Looks like all code in constructing Auth0Client must be edge-compatible. Can we lift this? #1932
Comments
+1 my company is using a deployment service where functions@edge, middleware@edge (anything in the edge) is not supported. In V3, we were able to leverage I am unable to find docs that differentiate different apis nor find documentation where the v4 auth0 apis are running on. Are there equivalents of |
Thank you for highlighting this issue. In v4, we've made architectural changes to support Next.js App Router and Edge Runtime, which means that code used in Auth0Client construction (including hooks like While we don't plan to remove this constraint entirely (as it would compromise our edge compatibility), we're exploring some potential solutions:
We are also open to community suggestions on how to tackle this problem efficiently. Could you share more about your specific use case and which third-party libraries you're trying to use? This would help us prioritize and design the right solution. In the meantime, you might consider moving non-edge-compatible code outside the Auth0Client construction and implementing a pattern where edge-compatible code calls these functions conditionally when not in an edge environment. |
We are using AWS Amplify for our production applications. Their Nextjs support can be found here: https://docs.aws.amazon.com/amplify/latest/userguide/ssr-amplify-support.html#supported-unsupported-features It would had been nice that both approaches had been supported on v4 just like v3 is doing, where you can set and authenticate the requests on the middleware, or programmatically use the higher order functions to keep a page or api route authenticated. It's unfortunate that this has been classified as a Feature Request since it was supported before.
Do you have any guidance on how to achieve this? it sounds that most probably we would need to build a custom authorizer, but i may be wrong.
This would be a nice solve! Unfortunately this is a big blocker for us for upgrading to Next 15 and most likely we would have to stop using this library and rely on the |
Checklist
Describe the problem you'd like to have solved
Hi,
We are currently migrating to v4 from v3. One frustrating issue is that when constructing
Auth0Client
on the optionbeforeSessionSaved
, we met some edge runtime issue. Turns out, we cannot use any non-edge API in those code.Describe the ideal solution
Can we lift this restriction? We are relying on some 3rd party libraries to do logic verifications and this dramatically limit our capabilities
Alternatives and current workarounds
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: