logto-io / js

🤓 Logto JS SDKs.
https://docs.logto.io/quick-starts/
MIT License
67 stars 40 forks source link

refactor(next): remove iron session #545

Closed wangsijie closed 1 year ago

wangsijie commented 1 year ago

Summary

Remove "iron session" dependency in Next.js SDK, replaced with our own implementation of cookie-based session.

The reason is that, "iron session" depends on Request and Response, which is not available in Next.js's Server Actions. Next, we'll add support for Server Actions.

Testing

Pass existing tests, and tested locally with real Logto endpoint.

Checklist

linear[bot] commented 1 year ago
LOG-7062 Remove iron session

implement it on our own

charIeszhao commented 1 year ago

Do we need to draft a changeset? Do we need to update next sample project?

wangsijie commented 1 year ago

@charIeszhao I think the answer is no, because this is a refactor, the usage stays the same.

charIeszhao commented 1 year ago

@charIeszhao I think the answer is no, because this is a refactor, the usage stays the same.

OK, I'm good.