mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 07:47:32 +00:00
fix(API): select org context by domain (#8706)
# Which Problems Are Solved
V2 and V3 APIs allow setting the organization context by providing the
organization domain in the request. Users currently experience the
following error: "rpc error: code = Unauthenticated desc = context
missing (AUTH-rKLWEH)"
# How the Problems Are Solved
Correctly check the org domain when set.
# Additional Changes
None
# Additional Context
- support request
(cherry picked from commit dc7330f251
)
This commit is contained in:
@@ -124,7 +124,7 @@ func VerifyTokenAndCreateCtxData(ctx context.Context, token, orgID, orgDomain st
|
||||
orgID = resourceOwner
|
||||
}
|
||||
// System API calls don't have a resource owner
|
||||
if orgID != "" {
|
||||
if orgID != "" || orgDomain != "" {
|
||||
orgID, err = t.ExistsOrg(ctx, orgID, orgDomain)
|
||||
if err != nil {
|
||||
return CtxData{}, zerrors.ThrowPermissionDenied(nil, "AUTH-Bs7Ds", "Organisation doesn't exist")
|
||||
|
Reference in New Issue
Block a user