版本发布 8
## What's Changed * Add context7.json to repo by @nicknisi in https://github.com/workos/authkit-nextjs/pull/345 * feat: enable npm Trusted Publishers by @nicknisi in https://github.com/workos/authkit-nextjs/pull/346 * feat: add TokenRefreshError with userId and sessionId for debugging by @nicknisi in https://github.com/workos/authkit-nextjs/pull/349 * feat: add composable proxy/middleware helpers by @nicknisi in https://github.com/workos/authkit-nextjs/pull/348 * fix(tests): move window.location patching and restoration to beforeEach/afterEach by @sundaray in https://github.com/workos/authkit-nextjs/pull/350 * fix: avoid calling headers() in middleware context by @nicknisi in https://github.com/workos/authkit-nextjs/pull/354 * fix(test): restore document.querySelector mock in afterEach by @sundaray in https://github.com/workos/authkit-nextjs/pull/356 * fix(test): restore process.env after each test by @sundaray in https://github.com/workos/authkit-nextjs/pull/357 * v2.13.0 by @nicknisi in https://github.com/workos/authkit-nextjs/pull/358 ## New Contributors * @sundaray made their first contribution in https://github.com/workos/authkit-nextjs/pull/350 **Full Changelog**: https://github.com/workos/authkit-nextjs/compare/v2.12.2...v2.13.0
## What's Changed * fix: bump Next.js dev dependency to patched version by @nickcollisson-workos in https://github.com/workos/authkit-nextjs/pull/343 * v2.12.2 by @nicknisi in https://github.com/workos/authkit-nextjs/pull/344 **Full Changelog**: https://github.com/workos/authkit-nextjs/compare/v2.12.1...v2.12.2
## What's Changed * feat: Add initialAuth to AuthkitProvider by @danielr18 in https://github.com/workos/authkit-nextjs/pull/323 **Full Changelog**: https://github.com/workos/authkit-nextjs/compare/v2.11.1...v2.12.0
## What's Changed * Specify 'use client' to differentiate between a server component. by @brandonin in https://github.com/workos/authkit-nextjs/pull/310 * Allow onSuccess callback to update session by @nholden in https://github.com/workos/authkit-nextjs/pull/311 ## New Contributors * @brandonin made their first contribution in https://github.com/workos/authkit-nextjs/pull/310 * @nholden made their first contribution in https://github.com/workos/authkit-nextjs/pull/311 **Full Changelog**: https://github.com/workos/authkit-nextjs/compare/v2.8.0...v2.9.0
## What's Changed * Add `roles` to session JWT by @atainter in https://github.com/workos/authkit-nextjs/pull/308 * v2.8.0 by @atainter in https://github.com/workos/authkit-nextjs/pull/309 ## New Contributors * @atainter made their first contribution in https://github.com/workos/authkit-nextjs/pull/308 **Full Changelog**: https://github.com/workos/authkit-nextjs/compare/v2.7.1...v2.8.0
## What's Changed * Fix SSR hydration mismatch in tokenStore by @nicknisi in https://github.com/workos/authkit-nextjs/pull/306 **Full Changelog**: https://github.com/workos/authkit-nextjs/compare/v2.7.0...v2.7.1
## What's Changed * add prompt to getAuthorizationURL by @jameslcarpino in https://github.com/workos/authkit-nextjs/pull/292 * fix: allow signOut to work outside middleware coverage by @nicknisi in https://github.com/workos/authkit-nextjs/pull/296 * Fix: Show loading state during initial token fetch to prevent flash by @nicknisi in https://github.com/workos/authkit-nextjs/pull/297 ## New Contributors * @jameslcarpino made their first contribution in https://github.com/workos/authkit-nextjs/pull/292 **Full Changelog**: https://github.com/workos/authkit-nextjs/compare/v2.5.0...v2.6.0
## What's Changed * Fix token staleness in inactive browser tabs by @nicknisi in https://github.com/workos/authkit-nextjs/pull/290 **Full Changelog**: https://github.com/workos/authkit-nextjs/compare/v2.4.6...v2.5.0