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

refactor: rework hooks and self-service flow completion #349

Merged
merged 2 commits into from
Apr 15, 2020
Merged

Commits on Apr 15, 2020

  1. refactor: rework hooks and self-service flow completion

    This patch focuses on refactoring how self-service flows terminate and
    changes how hooks behave and when they are executed.
    
    Before this patch, it was not clear whether hooks run before or
    after an identity is persisted. This caused problems with multiple
    writes on the HTTP ResponseWriter and other bugs.
    
    This patch removes hooks from after login, registration, and profile flows.
    Per default, these flows now respond with an appropriate payload (
    redirect for browsers, JSON for API clients) and deprecate
    the `redirect` hook. This patch includes documentation which explains
    how these hooks work now.
    
    Additionally, the documentation was updated. Especially the sections
    about hooks have been refactored. The login and user registration docs
    have been updated to reflect the latest changes as well.
    
    Also, some other minor, cosmetic, changes to the documentation have been made.
    
    Closes #348
    See #347
    See #179
    Closes #51
    Closes #50
    Closes #31
    
    BREAKING CHANGE: Please remove the `redirect` hook from both login,
    registration, and settings after configuration. Please remove
    the `session` hook from your login after configuration. Hooks
    have moved down a level and are now configured at
    `selfservice.<login|registration|settings>.<after|before>.hooks`
    instead of
    `selfservice.<login|registration|settings>.<after|before>.hooks`.
    Hooks are now identified by `hook:` instead of `job:`. Please
    rename those sections accordingly.
    aeneasr committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    a3f6e3c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8218ce4 View commit details
    Browse the repository at this point in the history