-
Notifications
You must be signed in to change notification settings - Fork 22
Add roles to directory sync user and sso profile
#497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Greptile OverviewGreptile SummaryAdded the
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant API as WorkOS API
participant SDK as Python SDK
participant App as Application
Note over API,App: SSO Profile with Multiple Roles
App->>SDK: sso.get_profile_and_token(code)
SDK->>API: POST /sso/token
API-->>SDK: {profile: {..., role: {slug: "admin"}, roles: [{slug: "admin"}]}, access_token: "..."}
SDK->>SDK: Parse Profile model (includes roles field)
SDK-->>App: ProfileAndToken(profile, access_token)
Note over API,App: Directory Sync User with Multiple Roles
App->>SDK: directory_sync.get_user(user_id)
SDK->>API: GET /directory_users/{user_id}
API-->>SDK: {..., role: {slug: "member"}, roles: [{slug: "member"}]}
SDK->>SDK: Parse DirectoryUser model (includes roles field)
SDK-->>App: DirectoryUser with roles
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 files reviewed, no comments
csrbarber
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
Description
Adds the
rolesfield to directory user and sso profile to support multiple roles.Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.