-
Notifications
You must be signed in to change notification settings - Fork 968
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
Rebrand hooks to workflow(s) #50
Labels
package/selfservice
Affects selfservice components
package/2fa
Affects 2FA components
rfc
A request for comments to discuss and share ideas.
Milestone
Comments
Workflow state machineLegend:
Post-registrationPost-loginStratosphere View |
We call them workflow and jobs in the docs, in the code it's still "hooks". But we can move this to the next release. |
aeneasr
added
rfc
A request for comments to discuss and share ideas.
package/2fa
Affects 2FA components
labels
Feb 1, 2020
aeneasr
added a commit
that referenced
this issue
Apr 15, 2020
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
added a commit
that referenced
this issue
Apr 15, 2020
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
added a commit
that referenced
this issue
Apr 15, 2020
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
added a commit
that referenced
this issue
Apr 15, 2020
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
added a commit
that referenced
this issue
Apr 15, 2020
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 certain 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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
package/selfservice
Affects selfservice components
package/2fa
Affects 2FA components
rfc
A request for comments to discuss and share ideas.
Hooks (
selfservice.login.(before|after)
) determine how hive should behave when a login or registration was completed without an error state. They do not modify the actual data of the identity and/or session. Therefore, they should be called "workflow" and "workflow step/handler/runner/part/item" from now on.Example: Password Registration
In this example, we want the user to be immediately signed in and redirected to our home page after registering a new account using email/password.
Configuration:
Example: Password Registration with (Email/Phone) Verification before login
In this example, we want the user to activate his/her account (by verifying the email or phone) before being able to sign in to our platform using email/password.
Configuration:
Flow:
Example: Password Registration with (Email/Phone) Verification and immediate Login
Alternatively, we could want our new users to be signed in immediately after registration, but still require email verification. The welcome page would then, for example, show a red notification bar with "please verify your email"
Configuration:
Example: Password Registration with JSON Response
In this example, we would expect a
application/json
response. This could be used for native apps for example.Configuration:
Example: Disallow Registration during Weekdays
We might want to disallow registration during weekdays:
before-registration.js
Example: Disallow Registration based on external service
Assuming we want to forbid registration because some upstream system (e.g. CRM) says "no" to the identity data
after-registration.js
Example: Create user at Stripe after Login / Registration
stripe.js
Example: enforced 2FA
Here we're using the built-in 2fa module:
hive/2fa.go
Example: contextual 2FA (e.g. based on source ip)
Assuming there is some context for our 2fa like a non-internal network ip
2fa.js
The text was updated successfully, but these errors were encountered: