Ensures in the withAdminAccess hook that an organizationId be set. We try to set a default here in the case that it's not, otherwise we raise an error
Sets the org id cookie on login and signup
In the login context, we differentiate how we set the orgId based on whether the request is a squeak.cloud login or an sdk login
Note: the org id cookie should really be stored in an encrypted cookie (preferably the session cookie), but historically this was used in the frontend. I'm still investigating whether we could quickly/easily make this change.
This PR fixes a few issues:
withAdminAccess
hook that anorganizationId
be set. We try to set a default here in the case that it's not, otherwise we raise an errorNote: the org id cookie should really be stored in an encrypted cookie (preferably the session cookie), but historically this was used in the frontend. I'm still investigating whether we could quickly/easily make this change.