Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
fix(plugin-multi-tenant): not setting cookie properly on login (#14107)
When using something like oauth, the cookie needs to be set. This is because the login happens elsewhere and the user is redirected. When the admin panel loads, there is already a user so the `useEffect` does not run since the user does not change like it does when logging in without oauth. The fix was to check if there is an intialValue and no matching cookie, then sync the tenants which will also set the cookie. Also useful if a user logs in and has a stale tenant cookie set.
J
Jarrod Flesch committed
559053522a0fcdbc23293e4d11e77bc0fd3e39bb
Parent: ee78eb2
Committed by GitHub <noreply@github.com>
on 10/7/2025, 7:27:58 PM