ory / integrations

Apache License 2.0
19 stars 24 forks source link

Kratos middleware for NextJS + AppDir #52

Closed KadoBOT closed 4 months ago

KadoBOT commented 1 year ago

The newest version of Next.JS (app dir), introduced some changes which made the previous version of the ory next-integration not to work.

This is my own take on the already existing integration, to make it work with the newest next.js version.

KadoBOT commented 1 year ago

This needs to be improved, but I wanted to leave this here for further feedback.

TODOs:

aeneasr commented 1 year ago

Cool! We definitely want to support the next version of NextJS

KadoBOT commented 1 year ago

@aeneasr I updated the code with the latest version I've been using on my personal project. The nextjs version I'm using is the 13.4.4.

Please let me know if you want me to refine this PR, so you can actually use it. Or if I leave it here as reference, so you can implement this yourself later is enough.

Besides that, I also tweaked the code of the Kratos nextjs template as well, so some APIs are called on the server instead of the client (useEffect). Please let me know if that's something that interest you, an I can create a PR like this one in the other repo.

Cheers

pvandamme commented 1 year ago

Hi there, any updates on these ? :)