After login not getting the activeOrganizationId

After creating a new account I redirect the User to an onboarding path.
After this a org will be created or joined. I can see activeOrganizationId in the browser dev tools.
But after a logout and login the User gets again redirected to the onboarding.
I can see the session but activeOrganizationId = null.
Solution
yea that's normal behaviour, from what ik, use the database hook to get the user organization (you can also save it in the db as lastActiveOrgId for example) before the session is created in the database (check image for example)
image.png
Was this page helpful?