Closed itsmeyaw closed 1 year ago
Thanks for reporting. It looks like it isn't returned by the Rest API when it hasn't been specified explicitly, can you confirm that as well?
There isn't much we can do from the SDK side tho, if the field isn't returned by the API we can't make it appear through using this SDK.
I reached out to the corresponding team internally to get more information about this behavior and whether or not it's expected.
Thank you for the reply! As I tried again, the GET client API (https://{{endpoint}}/api/v2/clients/{{client_id}}) returned both the value of cross_origin_auth
(which always return false) and cross_origin_authentication
(which holds the correct value) regardless the field is specified or not.
Do I understand correctly that it's now returned when using the SDK?
Sorry for being unclear, I meant when I tried directly using the REST Api, it returns the correct object (but contains both cross_origin_auth
and cross_origin_authentication
properties). However, the SDK does not include the new cross_origin_authentication
property.
Can you verify you use the exact same client id (and whatever you are using to call the API directly) to retrieve it, as our SDK should just pass through anything the API returns?
I used different value, the results are the same when the client id are the same. I also just realized that the value cross_origin_authentication
shows up when you change the value in the management API at least once. Is this the intended behavior of the API?
As mentioned, I reached out to the API team internally, but the SDK is working correctly. I can't speak for whether or not this is desired behavior.
Closing as our SDK does not control how the API behaves, but will follow up internally.
Thank you and I am looking forward to the follow up!
This appears to be as designed. We can ignore the cross_origin_auth and only focus on cross_origin_authentication. When no cross_origin_authentication is returned, it's the same as false.
Checklist
Description
The Auth0 Management API now uses the
cross_origin_authentication
instead ofcross_origin_auth
inside theClient
object to specify whether the client can perform CORS authentication.However, the current version of the API library does not include this when performing a GET query on a single application.
Reproduction
The issue can be reproduced consistently with the following steps:
getClient
method withclient_id
in the parameter, print the result returned from the method.Additional context
No response
node-auth0 version
3.6.0
Node.js version
18