cold-evening-80162
03/24/2022, 1:14 PM_After registration:_ is executed when a registration was successful:
◦ _Before persisting:_ runs before the identity is saved in the database.
◦ _After persisting:_ runs after the identity was saved in the database.
in documentation but there is no example on how to configure this correctly in kratos.yml file.damp-sunset-69236
03/24/2022, 1:26 PMcold-evening-80162
03/24/2022, 1:29 PM## registration ##
#
registration:
## Registration UI URL ##
#
# URL where the Registration UI is hosted. Check the [reference implementation](<https://github.com/ory/kratos-selfservice-ui-node>).
#
# Default value: <https://www.ory.sh/kratos/docs/fallback/registration>
#
# Examples:
# - <https://my-app.com/signup>
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SELFSERVICE_FLOWS_REGISTRATION_UI_URL=<value>
# - Windows Command Line (CMD):
# > set SELFSERVICE_FLOWS_REGISTRATION_UI_URL=<value>
#
ui_url: <https://my-app.com/signup>
## lifespan ##
#
# Default value: 1h
#
# Examples:
# - 1h
# - 1m
# - 1s
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SELFSERVICE_FLOWS_REGISTRATION_LIFESPAN=<value>
# - Windows Command Line (CMD):
# > set SELFSERVICE_FLOWS_REGISTRATION_LIFESPAN=<value>
#
lifespan: 1h
## before ##
#
before:
## hooks ##
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SELFSERVICE_FLOWS_REGISTRATION_BEFORE_HOOKS=<value>
# - Windows Command Line (CMD):
# > set SELFSERVICE_FLOWS_REGISTRATION_BEFORE_HOOKS=<value>
#
hooks:
- hook: web_hook
config:
url: <http://a.aaa>
method: ""
body: file:///path/to/body.jsonnet
auth:
type: api_key
config:
name: ""
value: ""
in: header
response:
ignore: false
## after ##
#
after:
## password ##
#
password:
## hooks ##
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SELFSERVICE_FLOWS_REGISTRATION_AFTER_PASSWORD_HOOKS=<value>
# - Windows Command Line (CMD):
# > set SELFSERVICE_FLOWS_REGISTRATION_AFTER_PASSWORD_HOOKS=<value>
#
hooks:
- hook: session
## Redirect browsers to set URL per default ##
#
# Ory Kratos redirects to this URL per default on completion of self-service flows and other browser interaction. Read this [article for more information on browser redirects](<https://www.ory.sh/kratos/docs/concepts/browser-redirect-flow-completion>).
#
# Examples:
# - <https://my-app.com/dashboard>
# - /dashboard
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SELFSERVICE_FLOWS_REGISTRATION_AFTER_PASSWORD_DEFAULT_BROWSER_RETURN_URL=<value>
# - Windows Command Line (CMD):
# > set SELFSERVICE_FLOWS_REGISTRATION_AFTER_PASSWORD_DEFAULT_BROWSER_RETURN_URL=<value>
#
default_browser_return_url: <https://my-app.com/dashboard>
## webauthn ##
#
webauthn:
## hooks ##
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SELFSERVICE_FLOWS_REGISTRATION_AFTER_WEBAUTHN_HOOKS=<value>
# - Windows Command Line (CMD):
# > set SELFSERVICE_FLOWS_REGISTRATION_AFTER_WEBAUTHN_HOOKS=<value>
#
hooks:
- hook: session
## Redirect browsers to set URL per default ##
#
# Ory Kratos redirects to this URL per default on completion of self-service flows and other browser interaction. Read this [article for more information on browser redirects](<https://www.ory.sh/kratos/docs/concepts/browser-redirect-flow-completion>).
#
# Examples:
# - <https://my-app.com/dashboard>
# - /dashboard
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SELFSERVICE_FLOWS_REGISTRATION_AFTER_WEBAUTHN_DEFAULT_BROWSER_RETURN_URL=<value>
# - Windows Command Line (CMD):
# > set SELFSERVICE_FLOWS_REGISTRATION_AFTER_WEBAUTHN_DEFAULT_BROWSER_RETURN_URL=<value>
#
default_browser_return_url: <https://my-app.com/dashboard>
## oidc ##
#
oidc:
## hooks ##
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SELFSERVICE_FLOWS_REGISTRATION_AFTER_OIDC_HOOKS=<value>
# - Windows Command Line (CMD):
# > set SELFSERVICE_FLOWS_REGISTRATION_AFTER_OIDC_HOOKS=<value>
#
hooks:
- hook: session
## Redirect browsers to set URL per default ##
#
# Ory Kratos redirects to this URL per default on completion of self-service flows and other browser interaction. Read this [article for more information on browser redirects](<https://www.ory.sh/kratos/docs/concepts/browser-redirect-flow-completion>).
#
# Examples:
# - <https://my-app.com/dashboard>
# - /dashboard
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SELFSERVICE_FLOWS_REGISTRATION_AFTER_OIDC_DEFAULT_BROWSER_RETURN_URL=<value>
# - Windows Command Line (CMD):
# > set SELFSERVICE_FLOWS_REGISTRATION_AFTER_OIDC_DEFAULT_BROWSER_RETURN_URL=<value>
#
default_browser_return_url: <https://my-app.com/dashboard>
## hooks ##
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SELFSERVICE_FLOWS_REGISTRATION_AFTER_HOOKS=<value>
# - Windows Command Line (CMD):
# > set SELFSERVICE_FLOWS_REGISTRATION_AFTER_HOOKS=<value>
#
hooks:
- hook: web_hook
config:
url: <http://a.aaa>
method: ""
body: file:///path/to/body.jsonnet
auth:
type: api_key
config:
name: ""
value: ""
in: header
response:
ignore: false
## Redirect browsers to set URL per default ##
#
# Ory Kratos redirects to this URL per default on completion of self-service flows and other browser interaction. Read this [article for more information on browser redirects](<https://www.ory.sh/kratos/docs/concepts/browser-redirect-flow-completion>).
#
# Examples:
# - <https://my-app.com/dashboard>
# - /dashboard
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SELFSERVICE_FLOWS_REGISTRATION_AFTER_DEFAULT_BROWSER_RETURN_URL=<value>
# - Windows Command Line (CMD):
# > set SELFSERVICE_FLOWS_REGISTRATION_AFTER_DEFAULT_BROWSER_RETURN_URL=<value>
#
default_browser_return_url: <https://my-app.com/dashboard>
## Enable User Registration ##
#
# If set to true will enable [User Registration](<https://www.ory.sh/kratos/docs/self-service/flows/user-registration/>).
#
# Default value: true
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SELFSERVICE_FLOWS_REGISTRATION_ENABLED=<value>
# - Windows Command Line (CMD):
# > set SELFSERVICE_FLOWS_REGISTRATION_ENABLED=<value>
#
enabled: false
jolly-jelly-9637
03/24/2022, 1:55 PMcold-evening-80162
03/24/2022, 2:01 PM