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

More password change params #159

Merged
merged 3 commits into from
Feb 5, 2019

Conversation

nhusher
Copy link
Contributor

@nhusher nhusher commented Feb 4, 2019

Changes

Updates the post_password_change method to contain a few new parameters based on the auth0 docs:

  • mark_email_as_verified - if true, this marks the user's email as verified after they change their password
  • includeEmailInRedirect - if true, this includes the user's email address as part of the returnUrl
  • ttl_sec - The TTL of the ticket

Additionally, I reordered the params to match the auth0 documentation. This might be a breaking change, I'm not a proficient-enough rubyist to know.

References

Auth0 "Create a password change ticket" documentation

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of Ruby

Checklist

Based on the [auth0 docs]:

- `mark_email_as_verified` - if true, this marks the user's email as verified after they change their password
- `includeEmailInRedirect` - if true, this includes the user's email address as part of the returnUrl

Additionally, I reordered the params to match the auth0 documentation. This might be a breaking change, I'm not a proficient-enough rubyist to know.

[auth0 docs]: https://auth0.com/docs/api/management/v2#!/Tickets/post_password_change
Copy link
Contributor

@joshcanhelp joshcanhelp left a comment

Choose a reason for hiding this comment

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

Thanks @nhusher! It looks like you added ttl_sec as well? A bit hard to follow the PR with the order changes.

Additionally, I reordered the params to match the auth0 documentation.

In this case, it does not matter (see keyword args), though it does make the PR a little harder to follow.

lib/auth0/api/v2/tickets.rb Outdated Show resolved Hide resolved
lib/auth0/api/v2/tickets.rb Outdated Show resolved Hide resolved
lib/auth0/api/v2/tickets.rb Outdated Show resolved Hide resolved
@joshcanhelp joshcanhelp added this to the v4.7.0 milestone Feb 4, 2019
@nhusher
Copy link
Contributor Author

nhusher commented Feb 4, 2019

Added some basic sanity checking that endpoint

Copy link
Contributor

@joshcanhelp joshcanhelp left a comment

Choose a reason for hiding this comment

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

Looks great, thank you for this!

@joshcanhelp joshcanhelp merged commit ee84bef into auth0:master Feb 5, 2019
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.

3 participants