Skip to content
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

Fix create_user implementation #244

Merged
merged 4 commits into from
Oct 21, 2020
Merged

Conversation

davidpatrick
Copy link
Contributor

create_user currently does not enforce the required connection param, while also forcing an optional param. This change introduces a breaking change since users will need to change their implementation create_user

closes #171

create_user currently does not enforce the required connection param, while also forcing an optional param
stevehobbsdev
stevehobbsdev previously approved these changes Oct 20, 2020
Copy link
Contributor

@stevehobbsdev stevehobbsdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just left a small question

lib/auth0/api/v2/users.rb Show resolved Hide resolved
@davidpatrick davidpatrick merged commit 0d2939b into master Oct 21, 2020
@davidpatrick davidpatrick deleted the create-user-implementation branch October 21, 2020 16:18
@davidpatrick davidpatrick mentioned this pull request Oct 22, 2020
eric-hemasystems pushed a commit to eric-hemasystems/sync_attr_with_auth0 that referenced this pull request Feb 18, 2021
For BloodRelay I want to use a newer version of the Auth0 library.
URI.escape has been throwing deprecation warnings for a while but
now it's removed from Ruby 3 which means we need to be on a newer
version of Auth0 that no longer uses that method[1].

Had to decide if we want to stay on the 4.x series of Auth0 or the
5.x series due to a breaking change in `create_user` (or have our
library detect the version and call with the right arguments)[2]. I
opted to require v5 since it is better tested against recent versions
of Ruby[3].

Upgrading the auth0 gem required moving to the 2.2.x series of the JWT
library. The method doing the base64 encoding of the JWT signature has
moved. Also the `typ` header is no longer generated[4]. It seems it is
not required by the spec but Auth0 does require it so adding it as
a parameter manually. The algorithm param is the same as the default.
I just had to specify it to pass in header options.

Other than these library upgrades and the code changes caused by the
upgrades this commit includes no change in functionality. The test
suite passes but since it's heavily mocked I'll also note I have already
tested this against an upgraded version of BR to verify it really
doesn't break anything (this is how the `typ` thing was discovered).

1. auth0/ruby-auth0#202
2. auth0/ruby-auth0#244
3. auth0/ruby-auth0#256
4. jwt/ruby-jwt#233
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mismatch between create_user method implementation and endpoint
2 participants