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

feat: add --no-shutdown flag to "hydra token user" to prevent auto-termination (#2382) #2386

Merged
merged 7 commits into from
Mar 7, 2021
Merged

feat: add --no-shutdown flag to "hydra token user" to prevent auto-termination (#2382) #2386

merged 7 commits into from
Mar 7, 2021

Conversation

verzac
Copy link
Contributor

@verzac verzac commented Mar 6, 2021

Related issue

#2382 @aeneasr

Proposed changes

Added --no-shutdown flag to hydra token user, which signifies that shutdown() should not be called. Also added the capability to regenerate state/nonce upon success/error - basically whenever /callback is called and whenever shutdown should've occurred if --no-shutdown was not provided.

Checklist

  • I have read the contributing guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security. vulnerability, I
    confirm that I got green light (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further comments

Can't seem to figure out which docs I should change, as some of them are versioned and some of them aren't. Happy to update the docs if I'm pointed to the right direction!

This change regenerates state/nonce on error too, not just on success. Not sure if we're keen on this one, but I tried to keep the behaviour consistent with "we're terminating" -> "if --no-shutdown is provided, we're restarting the flow".

Also, added a nifty "Back to Welcome Page" button so that people can just click it to go back to the start of the flow.

RE: Tests, I don't think there's any that I should update? Feel free to CMIIW tho, I'm pretty new to the codebase :)

@CLAassistant
Copy link

CLAassistant commented Mar 6, 2021

CLA assistant check
All committers have signed the CLA.

…nt to indicate that state and nonce is also regenerated when an error occurs
…o that it's clearer that it terminates on both success/error
Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

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

Awesome, thank you! 🎉 Your contribution makes Ory better :)

@aeneasr aeneasr merged commit a17d10e into ory:master Mar 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants