The Routes in User management throws cors error when called from another app. Eg(/rest/login). I understand that these are internal apis, but we are counting on it for logging in programatically and embedding it in the UI. I modified the cors.ts file. But Still it throws the same error. Also, used the corsMiddleware object in the this.app.use() of user management addroutes method. But it still throws error. Also, When I try to move this api call to backend (deployed separately), the cookie is not being set in the browser due to cross domain issues.
I suspect the issue here will be exactly what you have pointed at, These are internal APIs and not really designed to be use from outside of n8n which makes their use unsupported to a point.
That being said are you connecting directly to the backend API or going through a proxy first?
Hello @Jon ,
Happy New Year. I am directly using /rest/login to fetch the cookie and then loading the workflows screen in a iframe. Is there any other easy way to embed n8n other than this ?
We have seen a few issues with loading n8n in an iframe but I don’t think I have seen anyone try to do the login before. If you just load the page in an iframe and login that way does it work as expected?