最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

next.js - Safari does not recognize manually added cookies in the developer console when using iron-session - Stack Overflow

programmeradmin3浏览0评论

I am currently developing a PWA using Next.js and iron-session, and I am testing it locally with HTTPS using mkcert. While testing authentication, I encountered an issue specific to Safari.

Issue:

  • In Google Chrome, when I manually add a sessionKey cookie via the developer console and refresh the page, iron-session successfully recognizes the cookie and logs me in.
  • However, in Safari, even after adding the same sessionKey cookie manually in the developer console, refreshing the page does not log me in. It seems like iron-session does not recognize the cookie.

Environment:

  • Framework: Next.js (latest)
  • Session Library: iron-session
  • HTTPS Setup: Using mkcert for local HTTPS (https://localhost:3000)
  • Browsers Tested:
    • Chrome: Works fine (manually added cookie is recognized)
    • Safari: Manually added cookie is not recognized

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论