Closed SpencerLN closed 1 year ago
I have same behavior.
I experience the same
I experience the same behavior.
It seems that support for the signed_nonce
factor hasn't been implemented in the Python SDK since being added to Okta - the OKTA_FACTOR_TYPE_TO_FACTOR
dictionary in constants.py
doesn't have the signed_nonce
factor entry, and there is no corresponding model implemented under the models
directory.
Did someone regenerated SDK for the latest version of openapi spec? I still experience an issues with listing of factors as mentioned here in comments.
If it helps, I've been using the following manually-created request pattern from the SDK to work around this issue:
# https://github.com/okta/okta-sdk-python/issues/360
# user_factors, response, error = await client.list_factors(user.id)
request, error = await client.get_request_executor().create_request(
method='GET',
url='/api/v1/users/' + user.id + '/factors',
body={},
headers={}
)
if error is not None:
raise Exception(error)
response, error = await client.get_request_executor().execute(request, None)
if error is not None:
raise Exception(error)
user_factors = response.get_body()
for user_factor in user_factors:
df = dict({
'okta_user_id': [user.id],
'okta_user_login': [user.profile.login],
'status': [user_factor['status']],
'factorType': [user_factor['factorType']],
'provider': [user_factor['provider']],
'vendorName': [user_factor['vendorName']],
})
Yes, you can do it, but it's not proper solution if it's possible to fix openapi specs and refresh SDK to have all current types of factors covered. I am using it on 20+ servers.
Same issue here with listing signed_nonce. Hope it can be fixed soon as I would prefer to use the SDK instead of workaround.
This is still happening in the latest version - 2.9.5. OKTA_FACTOR_TYPE_TO_FACTOR
is missing the SIGNED_NONCE
factor type. Can you please generate a new version of the SDK with this small fix?
The API docs specify that a
signed_nonce
is a valid type of factor, but the Python SDK is unable to return successfully if one is encountered and returns aKeyError('signed_nonce')
: