-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add auth factor methods #217
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #217 +/- ##
==========================================
+ Coverage 87.72% 87.80% +0.08%
==========================================
Files 32 32
Lines 1157 1173 +16
==========================================
+ Hits 1015 1030 +15
- Misses 142 143 +1 ☔ View full report in Codecov by Sentry. |
workos/user_management.py
Outdated
|
||
def list_auth_factors( | ||
self, | ||
user, |
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.
do we tend to use params like user
or user_id
in the python SDK more? what about within the user management module?
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.
It seems to be more like user
, connection
, organization
, etc. It definitely seems like doing the _id
would be better, but that is the convention we're currently using elsewhere:
workos-python/workos/user_management.py
Line 75 in fb0e087
user (str) - User unique identifier |
Line 175 in fb0e087
def get_connection(self, connection): |
workos-python/workos/organizations.py
Line 157 in fb0e087
def get_organization(self, organization): |
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.
and we use organization_id here... but that's a list endpoint
workos-python/workos/user_management.py
Line 93 in fb0e087
organization_id=None, |
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.
blegh! lol
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.
yikes 🙈 I'm ok with starting to be more opinionated and go the *_id
route
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.
yeah how about within the UM module we go w/ *_id
?
fwiw we were also inconsistent at the API layer but for UM have made all params *_id
(and that'll be the plan for new APIs going forward)
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.
cool cool - I'll make those changes throughout the module now 👍
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.
I made those changes throughout the UM module, just to remind myself for later changes
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.
ty!
Description
Adds methods to enroll an authentication factor and list the authentication factors for a user.
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.