feat: add --no-shutdown flag to "hydra token user" to prevent auto-termination (#2382) #2386
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue
#2382 @aeneasr
Proposed changes
Added
--no-shutdown
flag tohydra token user
, which signifies thatshutdown()
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
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.
works.
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 :)