activeOrganizationId is null
Hi, i've been running into an issue that i've been trying to debug for a couple days now. With the org plugin, activeOrganizationId on the session is (usually) null, causing getActiveMember to break too.
Adding the below to my auth config sometimes fixes it, but sometimes it inexplicably breaks (for some orgs specifically).
Anyone have an idea on how to fix this?
My auth config is here: https://gist.github.com/Badbird5907/5628d5f881bc57f9d70462bfe232307a
The users were created with a script directly inserting the users/orgs into their respective tables in the db, and the users use the google provider to log in.
Thanks
2 Replies
I've also noticed that when I try to call
setActiveOrganization, It fails with the following error:
I have also tried adding activeOrganizationId as an additional field on session:
and the customSession plugin:
This actually adds the activeOrganizationId on the client, but not on the server
I believe (when activeOrganizationId is properly set via the db), the first time I run getSession and subsequently getActiveMember, everything works properly. However the second time it is run (for example on a page reload), it getSession returns a session with activeOrganizationId as null, and getActiveMember failsGitHub
fix: support for organizations with large member counts by Badbird5...
Hi,
My app has an organization which has approximately 6,000 members, we've encountered an issue where the activeOrganizationId field is set to null after calling getFullOrganization. More ...