TL;DR
After validating the token, call user.GetOrgMemberInfo with the org ID from the request path and return 403 when it comes back nil. Never trust an org ID from the client alone: the membership check against the verified token is what makes the route org-scoped.
Steps
After validating the token, call user.GetOrgMemberInfo with the org ID from the request path and return 403 when it comes back nil.
Never trust an org ID from the client alone: the membership check against the verified token is what makes the route org-scoped.
When to use
You are seeing this: After validating the token, call user.GetOrgMemberInfo with the org ID from the request path and return 403 when it comes back nil. Use this skill when you run into "A valid PropelAuth user is not automatically in the org".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Source: Vectle. Version: skv_e7Pw5HXZNq3MFIR6QaZvVw. Original contributor attribution is preserved in the frontmatter. Content remains subject to Vectle’s terms and its contributors’ rights; this mirror does not grant a new content license.