Skip to content

feat: Organisations support#114

Merged
rmad17 merged 17 commits into
mainfrom
SDK-8833-organisations-support
Jun 24, 2026
Merged

feat: Organisations support#114
rmad17 merged 17 commits into
mainfrom
SDK-8833-organisations-support

Conversation

@rmad17

@rmad17 rmad17 commented May 26, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Org login support: organization on ServerClient (client-level default) and StartInteractiveLoginOptions (per-login override); org_id / org_name claim validation enforced automatically at callback
  • Org invitation flow: invitation as a first-class typed field on StartInteractiveLoginOptions; forwarded to /authorize alongside organization
  • Org token validation error: OrganizationTokenValidationError raised when the org_id or org_name claim in the returned token does not match what was requested at login; all other org errors from Auth0 (access
    denied, invalid request, invitation rejected) surface as ApiError with the raw OAuth error code and error_description

###Out of Scope

  • Org enforcement on backchannel_authentication_grant, login_with_custom_token_exchange, and get_access_token refresh-path token exchange

References

https://auth0team.atlassian.net/browse/SDK-8833

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

@rmad17 rmad17 self-assigned this May 26, 2026
@rmad17 rmad17 requested a review from kishore7snehil June 7, 2026 18:48
@rmad17 rmad17 marked this pull request as ready for review June 7, 2026 18:49
@rmad17 rmad17 requested a review from a team as a code owner June 7, 2026 18:49
@rmad17 rmad17 changed the title SDK-8833 organisations support feat: Organisations support(SDK-8833) Jun 18, 2026
Comment thread src/auth0_server_python/auth_server/server_client.py Outdated
"code_challenge", "code_challenge_method", "state", "nonce", "scope",
"organization"]

_ORG_ACCESS_DENIED_DESCRIPTIONS = (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is feeding the string-matching I flagged on _classify_org_error - can come out along with it.

Comment thread src/auth0_server_python/auth_server/server_client.py Outdated
Comment thread src/auth0_server_python/auth_server/server_client.py Outdated
Comment thread src/auth0_server_python/auth_server/server_client.py Outdated
Comment thread src/auth0_server_python/error/__init__.py Outdated
Comment thread src/auth0_server_python/auth_server/server_client.py Outdated
Comment thread examples/Organizations.md Outdated
Comment thread examples/Organizations.md Outdated
Comment thread README.md Outdated
@rmad17 rmad17 requested a review from kishore7snehil June 18, 2026 11:43
self.name = "StartLinkUserError"


class OrganizationTokenValidationError(Auth0Error):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this below class AccessTokenErrorCode

scope: Optional[str] = None
actor_token: Optional[str] = None
actor_token_type: Optional[str] = None
organization: Optional[str] = None

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we delete this?

scope: Optional[str] = None
actor_token: Optional[str] = None
actor_token_type: Optional[str] = None
organization: Optional[str] = None

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we delete this?

Comment thread examples/InteractiveLogin.md
Comment thread src/auth0_server_python/auth_server/server_client.py Outdated
Comment thread src/auth0_server_python/auth_server/server_client.py Outdated
@rmad17 rmad17 requested a review from kishore7snehil June 23, 2026 10:33

@kishore7snehil kishore7snehil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rmad17 rmad17 merged commit 0935394 into main Jun 24, 2026
9 checks passed
@rmad17 rmad17 deleted the SDK-8833-organisations-support branch June 24, 2026 09:57
@kishore7snehil kishore7snehil mentioned this pull request Jun 25, 2026
@rmad17 rmad17 changed the title feat: Organisations support(SDK-8833) feat: Organisations support Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants