Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Workaround for UserIdentity.UserID being a number #102

Merged
merged 2 commits into from
Apr 3, 2020

Conversation

smaant
Copy link
Contributor

@smaant smaant commented Mar 11, 2020

Auth0 API has a bug - in some cases it might return identity.user_id as a number. Particularly for GitHub identities for requests to the /users/<user_id endpoint. In this case JSON unmarshalling will fail with an error:
"json: cannot unmarshal number into Go struct field UserIdentity.identities.user_id of type string"

I created a report in Auth0 community: https://community.auth0.com/t/users-user-id-returns-inconsistent-type-for-identities-user-id/39236
Meanwhile this PR should allow to work around this problem.

@alexkappa
Copy link
Contributor

Anton, thank you for working on this. I've made some modification to match it with ConnectionOptions and merged. Cheers!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants