-
Notifications
You must be signed in to change notification settings - Fork 28
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
Next.js basePath handling #45
Comments
actually, i think the root cause is not in the FrontendApi but in the @ory/integrations/next-edge here integrations/src/next-edge/index.ts Line 178 in 84858ea
|
i made a PR which should resolve my issue. you could pass |
Hello contributors! I am marking this issue as stale as it has not received any engagement from the community or maintainers for a year. That does not imply that the issue has no merit! If you feel strongly about this issue
Throughout its lifetime, Ory has received over 10.000 issues and PRs. To sustain that growth, we need to prioritize and focus on issues that are important to the community. A good indication of importance, and thus priority, is activity on a topic. Unfortunately, burnout has become a topic of concern amongst open-source projects. It can lead to severe personal and health issues as well as opening catastrophic attack vectors. The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone. If this issue was marked as stale erroneously you can exempt it by adding the Thank you for your understanding and to anyone who participated in the conversation! And as written above, please do participate in the conversation if this topic is important to you! Thank you 🙏✌️ |
I am running OpenFAAS based setup with multiple servers on different sub paths of same domain -
mydomain.com/function/app1
,mydomain.com/function/app2
etc.Now i'm trying to set up a Next + Ory app at
mydomain.com/function/nextapp
I am using Next.js 12 with @ory/client 1.1.4 and @ory/integrations 1.1.0
pages/api/.ory/[...paths].js
as suggested at https://github.com/ory/integrations#nextjspages/index.js
session detection try/catch and router.push redirect as suggested at https://www.ory.sh/docs/getting-started/integrate-auth/nextjsORY_SDK_URL
set up properly in my environmentI have a
basePath: '/function/nextapp'
in mynext.config.js
because I need the ory login pages to live onmydomain.com/function/nextapp/api/.ory/ui/login
instead ofmydomain.com/api/.ory/ui/login
Unfortunately, no matter what I try, I always end up being redirected to
mydomain.com/api/.ory/ui/login?flow=...
mydomain.com/function/nextapp/api/.ory/ui/login
router.push('mydomain.com/function/nextapp/api/.ory/ui/login')
/function/nextapp/api/.ory/
when instantiating FrontendApi such asnew FrontendApi(new Configuration({ basePath: 'mydomain.com/function/nextapp/api/.ory/ui/login' }))
Looks like the currently suggested Next + Ory setup ignores the
next.config.js
basePath and it is not possible to override it manually either.Looks like the FrontendApi ignores edgeConfig and always redirects to the root relative basePath
/api/.ory/ui/login
The text was updated successfully, but these errors were encountered: