You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
I have verified I have ORY_SDK_URL set up properly in my environment
I have a basePath: '/function/nextapp' in my next.config.js because I need the ory login pages to live on mydomain.com/function/nextapp/api/.ory/ui/login instead of mydomain.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=...
I tried manually going to the URL mydomain.com/function/nextapp/api/.ory/ui/login
I tried explicitly redirecting the user to the absolute url such as router.push('mydomain.com/function/nextapp/api/.ory/ui/login')
I tried explicitly overriding the edgeConfig.basePath to /function/nextapp/api/.ory/ when instantiating FrontendApi such as new 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:
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: