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 was testing out a setup running in a Next.js api route. Basically I think what I'll be working on might require a few screens that are pretty tightly coupled to auth, so I'd like to keep everything together in a Next app. So I figured I'd setup OpenAUTH in an api route under /api/auth. But that didn't work because there was no way to tell the Hono app that I needed it to run at the /api/auth base path, which needs to happen before the routes get added to it, if I understand correctly.
It seems like every place that needs to generate an OpenAUTH based url (like issuer, etc.) isn't configurable to handle this. I've started to put together a PR to allow for this (and perhaps other server configurations) but as I work on it I'm realizing that there are probably a bunch of spots where this would need to be added and I'm not sure it makes sense for me to dig through them all at the moment.
On a related note, I had trouble with things like adding the app to a route under another Hono app as well. I kept getting
hono typeerror: cannot access invalid private field (evaluating 'app.#errorhandler')
despite the fact that I used the same pinned version of Hono.
The text was updated successfully, but these errors were encountered:
Hmm... I didn't realize that. Just read RFC 5785 and I guess I understand why.
I guess the use-case of integrating directly in a Next.js app becomes a bit more complicated, then. I guess you'd have to register the app in a couple different routes for it to work. I could see it being useful to some people. In my case, I'll find a different path forward for what I was testing.
I was testing out a setup running in a Next.js api route. Basically I think what I'll be working on might require a few screens that are pretty tightly coupled to auth, so I'd like to keep everything together in a Next app. So I figured I'd setup OpenAUTH in an api route under
/api/auth
. But that didn't work because there was no way to tell the Hono app that I needed it to run at the/api/auth
base path, which needs to happen before the routes get added to it, if I understand correctly.It seems like every place that needs to generate an OpenAUTH based url (like issuer, etc.) isn't configurable to handle this. I've started to put together a PR to allow for this (and perhaps other server configurations) but as I work on it I'm realizing that there are probably a bunch of spots where this would need to be added and I'm not sure it makes sense for me to dig through them all at the moment.
On a related note, I had trouble with things like adding the app to a route under another Hono app as well. I kept getting
despite the fact that I used the same pinned version of Hono.
The text was updated successfully, but these errors were encountered: