Repository: ory/kratos
Pull request #1021 (2021-01-28 11:40:49)

Improve contextualize
## Related issue

<!--
Please link the GitHub issue this pull request resolves in the format of `#1234`. If you discussed this change
with a maintainer, please mention her/him using the `@` syntax (e.g. `@aeneasr`).

If this change neither resolves an existing issue nor has sign-off from one of the maintainers, there is a
chance substantial changes will be requested or that the changes will be rejected.

You can discuss changes with maintainers either in the Github Discusssions in this repository or
join the [ORY Chat](https://www.ory.sh/chat).
-->

## Proposed changes

<!--
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
-->

## Checklist

<!--
Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of
them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
-->

- [ ] I have read the [contributing guidelines](../blob/master/CONTRIBUTING.md).
- [ ] I have read the [security policy](../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](mailto: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](docs/docs).

## Further comments

<!--
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution
you did and what alternatives you considered, etc...
-->



Patch:
diff --git a/.golangci.yml b/.golangci.yml
index f898498f6..2ef3feb96 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -21,4 +21,4 @@ run:
     - sdk/
   skip-files:
     - ".+_test.go"
-    - "internal/faker.go"
+    - "corpx/faker.go"
diff --git a/.schema/api.swagger.json b/.schema/api.swagger.json
index 9192990c5..d63cac137 100755
--- a/.schema/api.swagger.json
+++ b/.schema/api.swagger.json
@@ -1951,10 +1951,11 @@
       }
     },
     "errorContainer": {
+      "description": "ErrorContainer ErrorContainer ErrorContainer error container",
       "type": "object",
       "required": [
-        "errors",
-        "id"
+        "id",
+        "errors"
       ],
       "properties": {
         "errors": {
@@ -1967,7 +1968,7 @@
       }
     },
     "formField": {
-      "description": "FormField FormField FormField Field represents a HTML Form Field",
+      "description": "Field represents a HTML Form Field",
       "type": "object",
       "required": [
         "name",
@@ -2004,7 +2005,7 @@
       }
     },
     "formFields": {
-      "description": "FormFields Fields contains multiple fields",
+      "description": "Fields contains multiple fields",
       "type": "array",
       "items": {
         "$ref": "#/definitions/formField"
@@ -2013,7 +2014,7 @@
     "genericError": {
       "description": "Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred.",
       "type": "object",
-      "title": "Error response",
+      "title": "GenericError Error response",
       "properties": {
         "error": {
           "$ref": "#/definitions/genericErrorPayload"
@@ -2071,7 +2072,6 @@
       }
     },
     "healthStatus": {
-      "description": "HealthStatus health status",
       "type": "object",
       "properties": {
         "status": {
@@ -2147,11 +2147,12 @@
       }
     },
     "loginFlowMethodConfig": {
+      "description": "LoginFlowMethodConfig LoginFlowMethodConfig login flow method config",
       "type": "object",
       "required": [
         "action",
-        "fields",
-        "method"
+        "method",
+        "fields"
       ],
       "properties": {
         "action": {
@@ -2178,11 +2179,11 @@
       }
     },
     "loginViaApiResponse": {
-      "description": "LoginViaAPIResponse LoginViaAPIResponse The Response for Login Flows via API",
+      "description": "The Response for Login Flows via API",
       "type": "object",
       "required": [
-        "session_token",
-        "session"
+        "session",
+        "session_token"
       ],
       "properties": {
         "session": {
@@ -2197,13 +2198,13 @@
     "recoveryFlow": {
       "description": "This request is used when an identity wants to recover their account.\n\nWe recommend reading the [Account Recovery Documentation](../self-service/flows/password-reset-account-recovery)",
       "type": "object",
-      "title": "RecoveryFlow RecoveryFlow A Recovery Flow",
+      "title": "A Recovery Flow",
       "required": [
-        "id",
         "expires_at",
+        "id",
         "issued_at",
-        "request_url",
         "methods",
+        "request_url",
         "state"
       ],
       "properties": {
@@ -2247,10 +2248,11 @@
       }
     },
     "recoveryFlowMethod": {
+      "description": "RecoveryFlowMethod recovery flow method",
       "type": "object",
       "required": [
-        "config",
-        "method"
+        "method",
+        "config"
       ],
       "properties": {
         "config": {
@@ -2263,11 +2265,12 @@
       }
     },
     "recoveryFlowMethodConfig": {
+      "description": "RecoveryFlowMethodConfig RecoveryFlowMethodConfig RecoveryFlowMethodConfig RecoveryFlowMethodConfig RecoveryFlowMethodConfig recovery flow method config",
       "type": "object",
       "required": [
         "action",
-        "fields",
-        "method"
+        "method",
+        "fields"
       ],
       "properties": {
         "action": {
@@ -2287,14 +2290,13 @@
       }
     },
     "recoveryLink": {
-      "description": "RecoveryLink recovery link",
       "type": "object",
       "required": [
         "recovery_link"
       ],
       "properties": {
         "expires_at": {
-          "description": "Recovery Link Expires At\n\nThe timestamp when the recovery link expires.\nFormat: date-time",
+          "description": "Recovery Link Expires At\n\nThe timestamp when the recovery link expires.",
           "type": "string",
           "format": "date-time"
         },
@@ -2305,14 +2307,13 @@
       }
     },
     "registrationFlow": {
-      "description": "RegistrationFlow RegistrationFlow RegistrationFlow registration flow",
       "type": "object",
       "required": [
-        "id",
         "expires_at",
+        "id",
         "issued_at",
-        "request_url",
-        "methods"
+        "methods",
+        "request_url"
       ],
       "properties": {
         "active": {
@@ -2351,10 +2352,11 @@
       }
     },
     "registrationFlowMethod": {
+      "description": "RegistrationFlowMethod registration flow method",
       "type": "object",
       "required": [
-        "config",
-        "method"
+        "method",
+        "config"
       ],
       "properties": {
         "config": {
@@ -2366,12 +2368,11 @@
       }
     },
     "registrationFlowMethodConfig": {
-      "description": "RegistrationFlowMethodConfig registration flow method config",
       "type": "object",
       "required": [
         "action",
-        "method",
-        "fields"
+        "fields",
+        "method"
       ],
       "properties": {
         "action": {
@@ -2398,11 +2399,11 @@
       }
     },
     "registrationViaApiResponse": {
-      "description": "The Response for Registration Flows via API",
+      "description": "RegistrationViaAPIResponse The Response for Registration Flows via API",
       "type": "object",
       "required": [
-        "identity",
-        "session_token"
+        "session_token",
+        "identity"
       ],
       "properties": {
         "identity": {
@@ -2431,14 +2432,13 @@
       }
     },
     "session": {
-      "description": "Session Session session",
       "type": "object",
       "required": [
-        "id",
-        "expires_at",
         "authenticated_at",
-        "issued_at",
-        "identity"
+        "expires_at",
+        "id",
+        "identity",
+        "issued_at"
       ],
       "properties": {
         "active": {
@@ -2446,12 +2446,10 @@
           "type": "boolean"
         },
         "authenticated_at": {
-          "description": "authenticated at",
           "type": "string",
           "format": "date-time"
         },
         "expires_at": {
-          "description": "expires at",
           "type": "string",
           "format": "date-time"
         },
@@ -2462,7 +2460,6 @@
           "$ref": "#/definitions/Identity"
         },
         "issued_at": {
-          "description": "issued at",
           "type": "string",
           "format": "date-time"
         }
@@ -2525,11 +2522,10 @@
       }
     },
     "settingsFlowMethod": {
-      "description": "SettingsFlowMethod settings flow method",
       "type": "object",
       "required": [
-        "method",
-        "config"
+        "config",
+        "method"
       ],
       "properties": {
         "config": {
@@ -2542,11 +2538,12 @@
       }
     },
     "settingsFlowMethodConfig": {
+      "description": "SettingsFlowMethodConfig settings flow method config",
       "type": "object",
       "required": [
         "action",
-        "fields",
-        "method"
+        "method",
+        "fields"
       ],
       "properties": {
         "action": {
@@ -2584,7 +2581,7 @@
     "verificationFlow": {
       "description": "Used to verify an out-of-band communication\nchannel such as an email address or a phone number.\n\nFor more information head over to: https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation",
       "type": "object",
-      "title": "A Verification Flow",
+      "title": "VerificationFlow A Verification Flow",
       "required": [
         "methods",
         "state"
@@ -2595,7 +2592,7 @@
           "type": "string"
         },
         "expires_at": {
-          "description": "ExpiresAt is the time (UTC) when the request expires. If the user still wishes to verify the address,\na new request has to be initiated.",
+          "description": "ExpiresAt is the time (UTC) when the request expires. If the user still wishes to verify the address,\na new request has to be initiated.\nFormat: date-time",
           "type": "string",
           "format": "date-time"
         },
@@ -2603,7 +2600,7 @@
           "$ref": "#/definitions/UUID"
         },
         "issued_at": {
-          "description": "IssuedAt is the time (UTC) when the request occurred.",
+          "description": "IssuedAt is the time (UTC) when the request occurred.\nFormat: date-time",
           "type": "string",
           "format": "date-time"
         },
@@ -2630,10 +2627,11 @@
       }
     },
     "verificationFlowMethod": {
+      "description": "VerificationFlowMethod verification flow method",
       "type": "object",
       "required": [
-        "config",
-        "method"
+        "method",
+        "config"
       ],
       "properties": {
         "config": {
@@ -2646,12 +2644,11 @@
       }
     },
     "verificationFlowMethodConfig": {
-      "description": "VerificationFlowMethodConfig VerificationFlowMethodConfig verification flow method config",
       "type": "object",
       "required": [
         "action",
-        "method",
-        "fields"
+        "fields",
+        "method"
       ],
       "properties": {
         "action": {
@@ -2671,6 +2668,7 @@
       }
     },
     "version": {
+      "description": "Version Version Version Version Version version",
       "type": "object",
       "properties": {
         "version": {
diff --git a/cmd/daemon/serve.go b/cmd/daemon/serve.go
index bbaa5e49f..dfdc48eff 100644
--- a/cmd/daemon/serve.go
+++ b/cmd/daemon/serve.go
@@ -91,6 +91,7 @@ func ServePublic(r driver.Registry, wg *sync.WaitGroup, cmd *cobra.Command, args
 	r.RegisterPublicRoutes(router)
 	n.Use(reqlog.NewMiddlewareFromLogger(l, "public#"+c.SelfPublicURL().String()))
 	n.Use(sqa(cmd, r))
+	n.Use(r.PrometheusManager())
 
 	if tracer := r.Tracer(cmd.Context()); tracer.IsLoaded() {
 		n.Use(tracer)
diff --git a/continuity/persistence.go b/continuity/persistence.go
index ba99729b9..f0f7c53c4 100644
--- a/continuity/persistence.go
+++ b/continuity/persistence.go
@@ -26,12 +26,10 @@ type Persister interface {
 	DeleteContinuitySession(ctx context.Context, id uuid.UUID) error
 }
 
-func TestPersister(p interface {
+func TestPersister(ctx context.Context, p interface {
 	Persister
 	identity.PrivilegedPool
 }) func(t *testing.T) {
-	ctx := context.Background()
-
 	var createIdentity = func(t *testing.T) *identity.Identity {
 		id := identity.Identity{ID: x.NewUUID()}
 		require.NoError(t, p.CreateIdentity(ctx, &id))
diff --git a/internal/faker.go b/corpx/faker.go
similarity index 98%
rename from internal/faker.go
rename to corpx/faker.go
index 2a2c25aa0..15b421491 100644
--- a/internal/faker.go
+++ b/corpx/faker.go
@@ -1,4 +1,4 @@
-package internal
+package corpx
 
 import (
 	"math/rand"
@@ -22,7 +22,14 @@ import (
 	"github.com/ory/kratos/x"
 )
 
+var setup bool
+
 func RegisterFakes() {
+	if setup {
+		return
+	}
+	setup = true
+
 	_ = faker.SetRandomMapAndSliceSize(4)
 
 	if err := faker.AddProvider("birthdate", func(v reflect.Value) (interface{}, error) {
diff --git a/courier/persistence.go b/courier/persistence.go
index 7abde265f..7cf45eba1 100644
--- a/courier/persistence.go
+++ b/courier/persistence.go
@@ -32,8 +32,7 @@ type (
 	}
 )
 
-func TestPersister(p Persister) func(t *testing.T) {
-	ctx := context.Background()
+func TestPersister(ctx context.Context, p Persister) func(t *testing.T) {
 	return func(t *testing.T) {
 		t.Run("case=no messages in queue", func(t *testing.T) {
 			m, err := p.NextMessages(ctx, 10)
diff --git a/docs/docs/reference/api.mdx b/docs/docs/reference/api.mdx
index c430c8d3a..ecd227717 100644
--- a/docs/docs/reference/api.mdx
+++ b/docs/docs/reference/api.mdx
@@ -9151,7 +9151,7 @@ verification flow with link method_
 }
 ```
 
-_FormField FormField FormField Field represents a HTML Form Field_
+_Field represents a HTML Form Field_
 
 #### Properties
 
@@ -9220,7 +9220,7 @@ _FormFields Fields contains multiple fields_
 }
 ```
 
-_Error response_
+_GenericError Error response_
 
 #### Properties
 
@@ -9296,8 +9296,6 @@ GenericErrorPayload GenericErrorPayload generic error payload_
 }
 ```
 
-_HealthStatus health status_
-
 #### Properties
 
 | Name   | Type   | Required | Restrictions | Description                  |
@@ -9513,10 +9511,10 @@ _Login Flow_
 
 #### Properties
 
-| Name   | Type                                                  | Required | Restrictions | Description |
-| ------ | ----------------------------------------------------- | -------- | ------------ | ----------- |
-| config | [loginFlowMethodConfig](#schemaloginflowmethodconfig) | true     | none         | none        |
-| method | [CredentialsType](#schemacredentialstype)             | true     | none         | and so on.  |
+| Name   | Type                                                  | Required | Restrictions | Description                                                          |
+| ------ | ----------------------------------------------------- | -------- | ------------ | -------------------------------------------------------------------- |
+| config | [loginFlowMethodConfig](#schemaloginflowmethodconfig) | true     | none         | LoginFlowMethodConfig LoginFlowMethodConfig login flow method config |
+| method | [CredentialsType](#schemacredentialstype)             | true     | none         | and so on.                                                           |
 
 <a id="tocSloginflowmethodconfig"></a>
 
@@ -9575,6 +9573,8 @@ _Login Flow_
 }
 ```
 
+_LoginFlowMethodConfig LoginFlowMethodConfig login flow method config_
+
 #### Properties
 
 | Name      | Type                            | Required | Restrictions | Description                                                                                        |
@@ -9730,7 +9730,7 @@ _LoginViaAPIResponse LoginViaAPIResponse The Response for Login Flows via API_
 }
 ```
 
-_RecoveryFlow RecoveryFlow A Recovery Flow_
+_A Recovery Flow_
 
 #### Properties
 
@@ -9742,7 +9742,7 @@ _RecoveryFlow RecoveryFlow A Recovery Flow_
 | issued_at                  | string(date-time)                               | true     | none         | IssuedAt is the time (UTC) when the request occurred.                                                                                                                                 |
 | messages                   | [Messages](#schemamessages)                     | false    | none         | Messages Messages Messages Messages Messages Messages Messages Messages Messages Messages messages                                                                                    |
 | methods                    | object                                          | true     | none         | Methods contains context for all account recovery methods. If a registration request has been processed, but for example the password is incorrect, this will contain error messages. |
-| » **additionalProperties** | [recoveryFlowMethod](#schemarecoveryflowmethod) | false    | none         | none                                                                                                                                                                                  |
+| » **additionalProperties** | [recoveryFlowMethod](#schemarecoveryflowmethod) | false    | none         | RecoveryFlowMethod recovery flow method                                                                                                                                               |
 | request_url                | string                                          | true     | none         | RequestURL is the initial URL that was requested from ORY Kratos. It can be used to forward information contained in the URL's path or query for example.                             |
 | state                      | [State](#schemastate)                           | true     | none         | State State State State State State State State State State state                                                                                                                     |
 | type                       | [Type](#schematype)                             | false    | none         | The flow type can either be `api` or `browser`.                                                                                                                                       |
@@ -9789,12 +9789,14 @@ _RecoveryFlow RecoveryFlow A Recovery Flow_
 }
 ```
 
+_RecoveryFlowMethod recovery flow method_
+
 #### Properties
 
-| Name   | Type                                                        | Required | Restrictions | Description                                   |
-| ------ | ----------------------------------------------------------- | -------- | ------------ | --------------------------------------------- |
-| config | [recoveryFlowMethodConfig](#schemarecoveryflowmethodconfig) | true     | none         | none                                          |
-| method | string                                                      | true     | none         | Method contains the request credentials type. |
+| Name   | Type                                                        | Required | Restrictions | Description                                                                                                                                              |
+| ------ | ----------------------------------------------------------- | -------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| config | [recoveryFlowMethodConfig](#schemarecoveryflowmethodconfig) | true     | none         | RecoveryFlowMethodConfig RecoveryFlowMethodConfig RecoveryFlowMethodConfig RecoveryFlowMethodConfig RecoveryFlowMethodConfig recovery flow method config |
+| method | string                                                      | true     | none         | Method contains the request credentials type.                                                                                                            |
 
 <a id="tocSrecoveryflowmethodconfig"></a>
 
@@ -9835,6 +9837,9 @@ _RecoveryFlow RecoveryFlow A Recovery Flow_
 }
 ```
 
+_RecoveryFlowMethodConfig RecoveryFlowMethodConfig RecoveryFlowMethodConfig
+RecoveryFlowMethodConfig RecoveryFlowMethodConfig recovery flow method config_
+
 #### Properties
 
 | Name     | Type                            | Required | Restrictions | Description                                                                                        |
@@ -9857,14 +9862,12 @@ _RecoveryFlow RecoveryFlow A Recovery Flow_
 }
 ```
 
-_RecoveryLink recovery link_
-
 #### Properties
 
-| Name          | Type              | Required | Restrictions | Description                                                                              |
-| ------------- | ----------------- | -------- | ------------ | ---------------------------------------------------------------------------------------- |
-| expires_at    | string(date-time) | false    | none         | Recovery Link Expires At The timestamp when the recovery link expires. Format: date-time |
-| recovery_link | string            | true     | none         | Recovery Link This link can be used to recover the account.                              |
+| Name          | Type              | Required | Restrictions | Description                                                            |
+| ------------- | ----------------- | -------- | ------------ | ---------------------------------------------------------------------- |
+| expires_at    | string(date-time) | false    | none         | Recovery Link Expires At The timestamp when the recovery link expires. |
+| recovery_link | string            | true     | none         | Recovery Link This link can be used to recover the account.            |
 
 <a id="tocSregistrationflow"></a>
 
@@ -9995,8 +9998,6 @@ _RecoveryLink recovery link_
 }
 ```
 
-_RegistrationFlow RegistrationFlow RegistrationFlow registration flow_
-
 #### Properties
 
 | Name                       | Type                                                    | Required | Restrictions | Description                                                                                                                                                                            |
@@ -10007,7 +10008,7 @@ _RegistrationFlow RegistrationFlow RegistrationFlow registration flow_
 | issued_at                  | string(date-time)                                       | true     | none         | IssuedAt is the time (UTC) when the flow occurred.                                                                                                                                     |
 | messages                   | [Messages](#schemamessages)                             | false    | none         | Messages Messages Messages Messages Messages Messages Messages Messages Messages Messages messages                                                                                     |
 | methods                    | object                                                  | true     | none         | Methods contains context for all enabled registration methods. If a registration flow has been processed, but for example the password is incorrect, this will contain error messages. |
-| » **additionalProperties** | [registrationFlowMethod](#schemaregistrationflowmethod) | false    | none         | none                                                                                                                                                                                   |
+| » **additionalProperties** | [registrationFlowMethod](#schemaregistrationflowmethod) | false    | none         | RegistrationFlowMethod registration flow method                                                                                                                                        |
 | request_url                | string                                                  | true     | none         | RequestURL is the initial URL that was requested from ORY Kratos. It can be used to forward information contained in the URL's path or query for example.                              |
 | type                       | [Type](#schematype)                                     | false    | none         | The flow type can either be `api` or `browser`.                                                                                                                                        |
 
@@ -10071,12 +10072,14 @@ _RegistrationFlow RegistrationFlow RegistrationFlow registration flow_
 }
 ```
 
+_RegistrationFlowMethod registration flow method_
+
 #### Properties
 
-| Name   | Type                                                                | Required | Restrictions | Description                                                  |
-| ------ | ------------------------------------------------------------------- | -------- | ------------ | ------------------------------------------------------------ |
-| config | [registrationFlowMethodConfig](#schemaregistrationflowmethodconfig) | true     | none         | RegistrationFlowMethodConfig registration flow method config |
-| method | [CredentialsType](#schemacredentialstype)                           | true     | none         | and so on.                                                   |
+| Name   | Type                                                                | Required | Restrictions | Description |
+| ------ | ------------------------------------------------------------------- | -------- | ------------ | ----------- |
+| config | [registrationFlowMethodConfig](#schemaregistrationflowmethodconfig) | true     | none         | none        |
+| method | [CredentialsType](#schemacredentialstype)                           | true     | none         | and so on.  |
 
 <a id="tocSregistrationflowmethodconfig"></a>
 
@@ -10135,8 +10138,6 @@ _RegistrationFlow RegistrationFlow RegistrationFlow registration flow_
 }
 ```
 
-_RegistrationFlowMethodConfig registration flow method config_
-
 #### Properties
 
 | Name      | Type                            | Required | Restrictions | Description                                                                                        |
@@ -10212,7 +10213,7 @@ _RegistrationFlowMethodConfig registration flow method config_
 }
 ```
 
-_The Response for Registration Flows via API_
+_RegistrationViaAPIResponse The Response for Registration Flows via API_
 
 #### Properties
 
@@ -10426,7 +10427,7 @@ _SettingsFlow Flow represents a Settings Flow_
 | issued_at                  | string(date-time)                               | true     | none         | IssuedAt is the time (UTC) when the flow occurred.                                                                                                                               |
 | messages                   | [Messages](#schemamessages)                     | false    | none         | Messages Messages Messages Messages Messages Messages Messages Messages Messages Messages messages                                                                               |
 | methods                    | object                                          | true     | none         | Methods contains context for all enabled registration methods. If a settings flow has been processed, but for example the first name is empty, this will contain error messages. |
-| » **additionalProperties** | [settingsFlowMethod](#schemasettingsflowmethod) | false    | none         | SettingsFlowMethod settings flow method                                                                                                                                          |
+| » **additionalProperties** | [settingsFlowMethod](#schemasettingsflowmethod) | false    | none         | none                                                                                                                                                                             |
 | request_url                | string                                          | true     | none         | RequestURL is the initial URL that was requested from ORY Kratos. It can be used to forward information contained in the URL's path or query for example.                        |
 | state                      | [State](#schemastate)                           | true     | none         | State State State State State State State State State State state                                                                                                                |
 | type                       | [Type](#schematype)                             | false    | none         | The flow type can either be `api` or `browser`.                                                                                                                                  |
@@ -10473,14 +10474,12 @@ _SettingsFlow Flow represents a Settings Flow_
 }
 ```
 
-_SettingsFlowMethod settings flow method_
-
 #### Properties
 
-| Name   | Type                                                        | Required | Restrictions | Description                             |
-| ------ | ----------------------------------------------------------- | -------- | ------------ | --------------------------------------- |
-| config | [settingsFlowMethodConfig](#schemasettingsflowmethodconfig) | true     | none         | none                                    |
-| method | string                                                      | true     | none         | Method is the name of this flow method. |
+| Name   | Type                                                        | Required | Restrictions | Description                                          |
+| ------ | ----------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------- |
+| config | [settingsFlowMethodConfig](#schemasettingsflowmethodconfig) | true     | none         | SettingsFlowMethodConfig settings flow method config |
+| method | string                                                      | true     | none         | Method is the name of this flow method.              |
 
 <a id="tocSsettingsflowmethodconfig"></a>
 
@@ -10521,6 +10520,8 @@ _SettingsFlowMethod settings flow method_
 }
 ```
 
+_SettingsFlowMethodConfig settings flow method config_
+
 #### Properties
 
 | Name     | Type                            | Required | Restrictions | Description                                                                                        |
@@ -10776,19 +10777,19 @@ via API_
 }
 ```
 
-_A Verification Flow_
+_VerificationFlow A Verification Flow_
 
 #### Properties
 
 | Name                       | Type                                                    | Required | Restrictions | Description                                                                                                                                                                               |
 | -------------------------- | ------------------------------------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
 | active                     | string                                                  | false    | none         | Active, if set, contains the registration method that is being used. It is initially not set.                                                                                             |
-| expires_at                 | string(date-time)                                       | false    | none         | ExpiresAt is the time (UTC) when the request expires. If the user still wishes to verify the address, a new request has to be initiated.                                                  |
+| expires_at                 | string(date-time)                                       | false    | none         | ExpiresAt is the time (UTC) when the request expires. If the user still wishes to verify the address, a new request has to be initiated. Format: date-time                                |
 | id                         | [UUID](#schemauuid)                                     | false    | none         | none                                                                                                                                                                                      |
-| issued_at                  | string(date-time)                                       | false    | none         | IssuedAt is the time (UTC) when the request occurred.                                                                                                                                     |
+| issued_at                  | string(date-time)                                       | false    | none         | IssuedAt is the time (UTC) when the request occurred. Format: date-time                                                                                                                   |
 | messages                   | [Messages](#schemamessages)                             | false    | none         | Messages Messages Messages Messages Messages Messages Messages Messages Messages Messages messages                                                                                        |
 | methods                    | object                                                  | true     | none         | Methods contains context for all account verification methods. If a registration request has been processed, but for example the password is incorrect, this will contain error messages. |
-| » **additionalProperties** | [verificationFlowMethod](#schemaverificationflowmethod) | false    | none         | none                                                                                                                                                                                      |
+| » **additionalProperties** | [verificationFlowMethod](#schemaverificationflowmethod) | false    | none         | VerificationFlowMethod verification flow method                                                                                                                                           |
 | request_url                | string                                                  | false    | none         | RequestURL is the initial URL that was requested from ORY Kratos. It can be used to forward information contained in the URL's path or query for example.                                 |
 | state                      | [State](#schemastate)                                   | true     | none         | State State State State State State State State State State state                                                                                                                         |
 | type                       | [Type](#schematype)                                     | false    | none         | The flow type can either be `api` or `browser`.                                                                                                                                           |
@@ -10835,6 +10836,8 @@ _A Verification Flow_
 }
 ```
 
+_VerificationFlowMethod verification flow method_
+
 #### Properties
 
 | Name   | Type                                                                | Required | Restrictions | Description                                                                               |
diff --git a/go.mod b/go.mod
index 3ebd77bfc..821b5b63b 100644
--- a/go.mod
+++ b/go.mod
@@ -32,7 +32,7 @@ require (
 	github.com/go-swagger/go-swagger v0.25.0
 	github.com/gobuffalo/fizz v1.13.1-0.20200903094245-046abeb7de46
 	github.com/gobuffalo/httptest v1.0.2
-	github.com/gobuffalo/pop/v5 v5.3.2-0.20210108121026-333700c8729e
+	github.com/gobuffalo/pop/v5 v5.3.2-0.20210128124218-e397a61c1704
 	github.com/gobuffalo/uuid v2.0.5+incompatible
 	github.com/gofrs/uuid v3.2.0+incompatible
 	github.com/golang/gddo v0.0.0-20190904175337-72a348e765d2
diff --git a/go.sum b/go.sum
index b76e7836c..73a8a710f 100644
--- a/go.sum
+++ b/go.sum
@@ -589,8 +589,8 @@ github.com/gobuffalo/pop/v5 v5.0.11/go.mod h1:mZJHJbA3cy2V18abXYuVop2ldEJ8UZ2DK6
 github.com/gobuffalo/pop/v5 v5.2.0/go.mod h1:Hj586Cr7FoTFNmvzyNdUcajv3r0A+W+bkil4RIX/zKo=
 github.com/gobuffalo/pop/v5 v5.3.1 h1:dJbBPy6e0G0VRjn28md3fk16wpYIBv5iYVQWd0eqmkQ=
 github.com/gobuffalo/pop/v5 v5.3.1/go.mod h1:vcEDhh6cJ3WVENqJDFt/6z7zNb7lLnlN8vj3n5G9rYA=
-github.com/gobuffalo/pop/v5 v5.3.2-0.20210108121026-333700c8729e h1:Z+ubI9KoZMj7cmZVccDwTRic/bw7bymPlSqE+JyCcLc=
-github.com/gobuffalo/pop/v5 v5.3.2-0.20210108121026-333700c8729e/go.mod h1:vcEDhh6cJ3WVENqJDFt/6z7zNb7lLnlN8vj3n5G9rYA=
+github.com/gobuffalo/pop/v5 v5.3.2-0.20210128124218-e397a61c1704 h1:GuJhf1TPqHV8SeO5fgaZTO1xLZPevJqj15y/YQkuXgY=
+github.com/gobuffalo/pop/v5 v5.3.2-0.20210128124218-e397a61c1704/go.mod h1:Ey1hqzDLkWQKNEfsnafaz+3P1h/TrS++W9PmpGsNxvk=
 github.com/gobuffalo/release v1.0.35/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4=
 github.com/gobuffalo/release v1.0.38/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4=
 github.com/gobuffalo/release v1.0.42/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug=
@@ -804,10 +804,14 @@ github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9
 github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE=
 github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s=
 github.com/jackc/pgconn v1.3.2/go.mod h1:LvCquS3HbBKwgl7KbX9KyqEIumJAbm1UMcTvGaIf3bM=
+github.com/jackc/pgconn v1.4.0/go.mod h1:Y2O3ZDF0q4mMacyWV3AstPJpeHXWGEetiFttmq5lahk=
 github.com/jackc/pgconn v1.5.0 h1:oFSOilzIZkyg787M1fEmyMfOUUvwj0daqYMfaWwNL4o=
 github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI=
+github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI=
 github.com/jackc/pgconn v1.6.0 h1:8FiBxMxS/Z0eQ9BeE1HhL6pzPL1R5x+ZuQ+T86WgZ4I=
 github.com/jackc/pgconn v1.6.0/go.mod h1:yeseQo4xhQbgyJs2c87RAXOH2i624N0Fh1KSPJya7qo=
+github.com/jackc/pgconn v1.8.0 h1:FmjZ0rOyXTr1wfWs45i4a9vjnjWUAGpMuQLD9OSs+lw=
+github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=
 github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
 github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
 github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2 h1:JVX6jT/XfzNqIjye4717ITLaNwV9mWbJx0dLCpcRzdA=
@@ -824,14 +828,22 @@ github.com/jackc/pgproto3/v2 v2.0.1 h1:Rdjp4NFjwHnEslx2b66FfCI2S0LhO4itac3hXz6WX
 github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
 github.com/jackc/pgproto3/v2 v2.0.2 h1:q1Hsy66zh4vuNsajBUF2PNqfAMMfxU5mk594lPE9vjY=
 github.com/jackc/pgproto3/v2 v2.0.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
+github.com/jackc/pgproto3/v2 v2.0.6 h1:b1105ZGEMFe7aCvrT1Cca3VoVb4ZFMaFJLJcg/3zD+8=
+github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
 github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8 h1:Q3tB+ExeflWUW7AFcAhXqk40s9mnNYLk1nOkKNZ5GnU=
 github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
+github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg=
+github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
 github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=
 github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=
 github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=
 github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0=
 github.com/jackc/pgtype v1.3.0 h1:l8JvKrby3RI7Kg3bYEeU9TA4vqC38QDpFCfcrC7KuN0=
 github.com/jackc/pgtype v1.3.0/go.mod h1:b0JqxHvPmljG+HQ5IsvQ0yqeSi4nGcDTVjFoiLDb0Ik=
+github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkALtxZMCH411K+tKzNpwzCKU+AnPzBKZ+I+Po=
+github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ=
+github.com/jackc/pgtype v1.6.2 h1:b3pDeuhbbzBYcg5kwNmNDun4pFUD/0AAr1kLXZLeNt8=
+github.com/jackc/pgtype v1.6.2/go.mod h1:JCULISAZBFGrHaOXIIFiyfzW5VY0GRitRr8NeJsrdig=
 github.com/jackc/pgx v3.2.0+incompatible h1:0Vihzu20St42/UDsvZGdNE6jak7oi/UOeMzwMPHkgFY=
 github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I=
 github.com/jackc/pgx v3.6.2+incompatible h1:2zP5OD7kiyR3xzRYMhOcXVvkDZsImVXfj+yIyTQf3/o=
@@ -840,11 +852,18 @@ github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08
 github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
 github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
 github.com/jackc/pgx/v4 v4.4.1/go.mod h1:6iSW+JznC0YT+SgBn7rNxoEBsBgSmnC5FwyCekOGUiE=
+github.com/jackc/pgx/v4 v4.5.0/go.mod h1:EpAKPLdnTorwmPUUsqrPxy5fphV18j9q3wrfRXgo+kA=
 github.com/jackc/pgx/v4 v4.6.0 h1:Fh0O9GdlG4gYpjpwOqjdEodJUQM9jzN3Hdv7PN0xmm0=
 github.com/jackc/pgx/v4 v4.6.0/go.mod h1:vPh43ZzxijXUVJ+t/EmXBtFmbFVO72cuneCT9oAlxAg=
+github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6fOLDxqtlyhe9UWgfIi9R8+8v8GKV5TRA/o=
+github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg=
+github.com/jackc/pgx/v4 v4.10.1 h1:/6Q3ye4myIj6AaplUm+eRcz4OhK9HAvFf4ePsG40LJY=
+github.com/jackc/pgx/v4 v4.10.1/go.mod h1:QlrWebbs3kqEZPHCTGyxecvzG6tvIsYu+A5b1raylkA=
 github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
 github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
 github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
+github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
+github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
 github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA=
 github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
 github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
@@ -1236,6 +1255,8 @@ github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
 github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
 github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 h1:pntxY8Ary0t43dCZ5dqY4YTJCObLY1kIXl0uzMv+7DE=
 github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
+github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc h1:jUIKcSPO9MoMJBbEoyE/RJoE8vz7Mb8AjvifMMwSyvY=
+github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
 github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM=
 github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
 github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
@@ -1401,7 +1422,11 @@ go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU=
 go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
 go.uber.org/atomic v1.5.1 h1:rsqfU5vBkVknbhUGbAUwQKR2H4ItV8tjJ+6kJX4cxHM=
 go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
+go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk=
+go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
 go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
+go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
+go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
 go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
 go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM=
 go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
@@ -1678,6 +1703,7 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn
 golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191224055732-dd894d0a8a40/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
diff --git a/identity/pool.go b/identity/pool.go
index 71e967008..8fc443792 100644
--- a/identity/pool.go
+++ b/identity/pool.go
@@ -86,10 +86,9 @@ type (
 	}
 )
 
-func TestPool(conf *config.Config, p interface {
+func TestPool(ctx context.Context, conf *config.Config, p interface {
 	PrivilegedPool
 }) func(t *testing.T) {
-	ctx := context.Background()
 	return func(t *testing.T) {
 		exampleServerURL := urlx.ParseOrPanic("http://example.com")
 		conf.MustSet(config.ViperKeyPublicBaseURL, exampleServerURL.String())
diff --git a/internal/httpclient/models/complete_self_service_login_flow_with_password_method.go b/internal/httpclient/models/complete_self_service_login_flow_with_password_method.go
index 8342b519a..f792d9619 100644
--- a/internal/httpclient/models/complete_self_service_login_flow_with_password_method.go
+++ b/internal/httpclient/models/complete_self_service_login_flow_with_password_method.go
@@ -12,7 +12,7 @@ import (
 	"github.com/go-openapi/swag"
 )
 
-// CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod complete self service login flow with password method
+// CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod CompleteSelfServiceLoginFlowWithPasswordMethod complete self service login flow with password method
 //
 // swagger:model CompleteSelfServiceLoginFlowWithPasswordMethod
 type CompleteSelfServiceLoginFlowWithPasswordMethod struct {
diff --git a/internal/httpclient/models/complete_self_service_recovery_flow_with_link_method.go b/internal/httpclient/models/complete_self_service_recovery_flow_with_link_method.go
index 2dd7a8a6a..e8b64af36 100644
--- a/internal/httpclient/models/complete_self_service_recovery_flow_with_link_method.go
+++ b/internal/httpclient/models/complete_self_service_recovery_flow_with_link_method.go
@@ -12,7 +12,7 @@ import (
 	"github.com/go-openapi/swag"
 )
 
-// CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod complete self service recovery flow with link method
+// CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod CompleteSelfServiceRecoveryFlowWithLinkMethod complete self service recovery flow with link method
 //
 // swagger:model completeSelfServiceRecoveryFlowWithLinkMethod
 type CompleteSelfServiceRecoveryFlowWithLinkMethod struct {
diff --git a/internal/httpclient/models/complete_self_service_settings_flow_with_password_method.go b/internal/httpclient/models/complete_self_service_settings_flow_with_password_method.go
index 07bf3fd80..aac5c8c34 100644
--- a/internal/httpclient/models/complete_self_service_settings_flow_with_password_method.go
+++ b/internal/httpclient/models/complete_self_service_settings_flow_with_password_method.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod complete self service settings flow with password method
+// CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod CompleteSelfServiceSettingsFlowWithPasswordMethod complete self service settings flow with password method
 //
 // swagger:model CompleteSelfServiceSettingsFlowWithPasswordMethod
 type CompleteSelfServiceSettingsFlowWithPasswordMethod struct {
diff --git a/internal/httpclient/models/complete_self_service_verification_flow_with_link_method.go b/internal/httpclient/models/complete_self_service_verification_flow_with_link_method.go
index 956f051e8..c67e1fa5d 100644
--- a/internal/httpclient/models/complete_self_service_verification_flow_with_link_method.go
+++ b/internal/httpclient/models/complete_self_service_verification_flow_with_link_method.go
@@ -12,7 +12,7 @@ import (
 	"github.com/go-openapi/swag"
 )
 
-// CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod complete self service verification flow with link method
+// CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod CompleteSelfServiceVerificationFlowWithLinkMethod complete self service verification flow with link method
 //
 // swagger:model completeSelfServiceVerificationFlowWithLinkMethod
 type CompleteSelfServiceVerificationFlowWithLinkMethod struct {
diff --git a/internal/httpclient/models/create_identity.go b/internal/httpclient/models/create_identity.go
index efdb660d7..d0fd24523 100644
--- a/internal/httpclient/models/create_identity.go
+++ b/internal/httpclient/models/create_identity.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// CreateIdentity CreateIdentity CreateIdentity CreateIdentity CreateIdentity CreateIdentity CreateIdentity CreateIdentity CreateIdentity CreateIdentity create identity
+// CreateIdentity CreateIdentity CreateIdentity CreateIdentity CreateIdentity CreateIdentity CreateIdentity CreateIdentity CreateIdentity CreateIdentity CreateIdentity create identity
 //
 // swagger:model CreateIdentity
 type CreateIdentity struct {
diff --git a/internal/httpclient/models/create_recovery_link.go b/internal/httpclient/models/create_recovery_link.go
index 59444751b..c7f1ea6ed 100644
--- a/internal/httpclient/models/create_recovery_link.go
+++ b/internal/httpclient/models/create_recovery_link.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink create recovery link
+// CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink CreateRecoveryLink create recovery link
 //
 // swagger:model CreateRecoveryLink
 type CreateRecoveryLink struct {
diff --git a/internal/httpclient/models/error_container.go b/internal/httpclient/models/error_container.go
index a1faff304..7c1422042 100644
--- a/internal/httpclient/models/error_container.go
+++ b/internal/httpclient/models/error_container.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// ErrorContainer ErrorContainer ErrorContainer error container
+// ErrorContainer ErrorContainer ErrorContainer ErrorContainer error container
 //
 // swagger:model errorContainer
 type ErrorContainer struct {
diff --git a/internal/httpclient/models/form_field.go b/internal/httpclient/models/form_field.go
index 02ae39aff..fe2c651f1 100644
--- a/internal/httpclient/models/form_field.go
+++ b/internal/httpclient/models/form_field.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// FormField FormField FormField Field represents a HTML Form Field
+// FormField FormField FormField FormField Field represents a HTML Form Field
 //
 // swagger:model formField
 type FormField struct {
diff --git a/internal/httpclient/models/generic_error_payload.go b/internal/httpclient/models/generic_error_payload.go
index a63a5a221..84a516921 100644
--- a/internal/httpclient/models/generic_error_payload.go
+++ b/internal/httpclient/models/generic_error_payload.go
@@ -12,7 +12,7 @@ import (
 	"github.com/go-openapi/swag"
 )
 
-// GenericErrorPayload GenericErrorPayload GenericErrorPayload GenericErrorPayload GenericErrorPayload GenericErrorPayload GenericErrorPayload GenericErrorPayload GenericErrorPayload GenericErrorPayload generic error payload
+// GenericErrorPayload GenericErrorPayload GenericErrorPayload GenericErrorPayload GenericErrorPayload GenericErrorPayload GenericErrorPayload GenericErrorPayload GenericErrorPayload GenericErrorPayload GenericErrorPayload generic error payload
 //
 // swagger:model genericErrorPayload
 type GenericErrorPayload struct {
diff --git a/internal/httpclient/models/health_status.go b/internal/httpclient/models/health_status.go
index 5525dbc20..a2057e101 100644
--- a/internal/httpclient/models/health_status.go
+++ b/internal/httpclient/models/health_status.go
@@ -12,7 +12,7 @@ import (
 	"github.com/go-openapi/swag"
 )
 
-// HealthStatus health status
+// HealthStatus HealthStatus health status
 //
 // swagger:model healthStatus
 type HealthStatus struct {
diff --git a/internal/httpclient/models/id.go b/internal/httpclient/models/id.go
index 16268f926..a275a2dc5 100644
--- a/internal/httpclient/models/id.go
+++ b/internal/httpclient/models/id.go
@@ -11,7 +11,7 @@ import (
 	"github.com/go-openapi/strfmt"
 )
 
-// ID ID ID ID ID ID ID ID ID ID ID
+// ID ID ID ID ID ID ID ID ID ID ID ID
 //
 // swagger:model ID
 type ID int64
diff --git a/internal/httpclient/models/identity.go b/internal/httpclient/models/identity.go
index 2dc25e37c..4b9113e52 100644
--- a/internal/httpclient/models/identity.go
+++ b/internal/httpclient/models/identity.go
@@ -15,7 +15,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// Identity Identity Identity Identity Identity Identity Identity Identity Identity Identity identity
+// Identity Identity Identity Identity Identity Identity Identity Identity Identity Identity Identity identity
 //
 // swagger:model Identity
 type Identity struct {
diff --git a/internal/httpclient/models/login_flow.go b/internal/httpclient/models/login_flow.go
index 3cfb04fdf..1565d60ec 100644
--- a/internal/httpclient/models/login_flow.go
+++ b/internal/httpclient/models/login_flow.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// LoginFlow LoginFlow Login Flow
+// LoginFlow Login Flow
 //
 // This object represents a login flow. A login flow is initiated at the "Initiate Login API / Browser Flow"
 // endpoint by a client.
diff --git a/internal/httpclient/models/login_flow_method.go b/internal/httpclient/models/login_flow_method.go
index 7c5b77cfe..6e38e1a21 100644
--- a/internal/httpclient/models/login_flow_method.go
+++ b/internal/httpclient/models/login_flow_method.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// LoginFlowMethod LoginFlowMethod login flow method
+// LoginFlowMethod login flow method
 //
 // swagger:model loginFlowMethod
 type LoginFlowMethod struct {
diff --git a/internal/httpclient/models/login_flow_method_config.go b/internal/httpclient/models/login_flow_method_config.go
index 123b0890d..2f1378f53 100644
--- a/internal/httpclient/models/login_flow_method_config.go
+++ b/internal/httpclient/models/login_flow_method_config.go
@@ -15,7 +15,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// LoginFlowMethodConfig LoginFlowMethodConfig login flow method config
+// LoginFlowMethodConfig LoginFlowMethodConfig LoginFlowMethodConfig login flow method config
 //
 // swagger:model loginFlowMethodConfig
 type LoginFlowMethodConfig struct {
diff --git a/internal/httpclient/models/login_via_api_response.go b/internal/httpclient/models/login_via_api_response.go
index 888761de1..47fee7118 100644
--- a/internal/httpclient/models/login_via_api_response.go
+++ b/internal/httpclient/models/login_via_api_response.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// LoginViaAPIResponse LoginViaAPIResponse The Response for Login Flows via API
+// LoginViaAPIResponse The Response for Login Flows via API
 //
 // swagger:model loginViaApiResponse
 type LoginViaAPIResponse struct {
diff --git a/internal/httpclient/models/message.go b/internal/httpclient/models/message.go
index 5e122d423..9b1595de3 100644
--- a/internal/httpclient/models/message.go
+++ b/internal/httpclient/models/message.go
@@ -13,7 +13,7 @@ import (
 	"github.com/go-openapi/swag"
 )
 
-// Message Message Message Message Message Message Message Message Message Message message
+// Message Message Message Message Message Message Message Message Message Message Message message
 //
 // swagger:model Message
 type Message struct {
diff --git a/internal/httpclient/models/messages.go b/internal/httpclient/models/messages.go
index dc2fb841d..9896642f8 100644
--- a/internal/httpclient/models/messages.go
+++ b/internal/httpclient/models/messages.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/swag"
 )
 
-// Messages Messages Messages Messages Messages Messages Messages Messages Messages Messages messages
+// Messages Messages Messages Messages Messages Messages Messages Messages Messages Messages Messages messages
 //
 // swagger:model Messages
 type Messages []*Message
diff --git a/internal/httpclient/models/recovery_address.go b/internal/httpclient/models/recovery_address.go
index 3756b5dc6..da1b879e5 100644
--- a/internal/httpclient/models/recovery_address.go
+++ b/internal/httpclient/models/recovery_address.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// RecoveryAddress RecoveryAddress RecoveryAddress RecoveryAddress RecoveryAddress RecoveryAddress RecoveryAddress RecoveryAddress RecoveryAddress RecoveryAddress recovery address
+// RecoveryAddress RecoveryAddress RecoveryAddress RecoveryAddress RecoveryAddress RecoveryAddress RecoveryAddress RecoveryAddress RecoveryAddress RecoveryAddress RecoveryAddress recovery address
 //
 // swagger:model RecoveryAddress
 type RecoveryAddress struct {
diff --git a/internal/httpclient/models/recovery_address_type.go b/internal/httpclient/models/recovery_address_type.go
index c066f6a7b..737ad382d 100644
--- a/internal/httpclient/models/recovery_address_type.go
+++ b/internal/httpclient/models/recovery_address_type.go
@@ -11,7 +11,7 @@ import (
 	"github.com/go-openapi/strfmt"
 )
 
-// RecoveryAddressType RecoveryAddressType RecoveryAddressType RecoveryAddressType RecoveryAddressType RecoveryAddressType RecoveryAddressType RecoveryAddressType RecoveryAddressType RecoveryAddressType recovery address type
+// RecoveryAddressType RecoveryAddressType RecoveryAddressType RecoveryAddressType RecoveryAddressType RecoveryAddressType RecoveryAddressType RecoveryAddressType RecoveryAddressType RecoveryAddressType RecoveryAddressType recovery address type
 //
 // swagger:model RecoveryAddressType
 type RecoveryAddressType string
diff --git a/internal/httpclient/models/recovery_flow.go b/internal/httpclient/models/recovery_flow.go
index 9dfce340f..6cee1d040 100644
--- a/internal/httpclient/models/recovery_flow.go
+++ b/internal/httpclient/models/recovery_flow.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// RecoveryFlow RecoveryFlow A Recovery Flow
+// RecoveryFlow A Recovery Flow
 //
 // This request is used when an identity wants to recover their account.
 //
diff --git a/internal/httpclient/models/recovery_flow_method.go b/internal/httpclient/models/recovery_flow_method.go
index 112cbd4af..15fa7184d 100644
--- a/internal/httpclient/models/recovery_flow_method.go
+++ b/internal/httpclient/models/recovery_flow_method.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// RecoveryFlowMethod recovery flow method
+// RecoveryFlowMethod RecoveryFlowMethod recovery flow method
 //
 // swagger:model recoveryFlowMethod
 type RecoveryFlowMethod struct {
diff --git a/internal/httpclient/models/recovery_flow_method_config.go b/internal/httpclient/models/recovery_flow_method_config.go
index e555cbb07..a12f2cd7f 100644
--- a/internal/httpclient/models/recovery_flow_method_config.go
+++ b/internal/httpclient/models/recovery_flow_method_config.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// RecoveryFlowMethodConfig RecoveryFlowMethodConfig RecoveryFlowMethodConfig RecoveryFlowMethodConfig RecoveryFlowMethodConfig recovery flow method config
+// RecoveryFlowMethodConfig recovery flow method config
 //
 // swagger:model recoveryFlowMethodConfig
 type RecoveryFlowMethodConfig struct {
diff --git a/internal/httpclient/models/recovery_link.go b/internal/httpclient/models/recovery_link.go
index 0b45e211f..f8e20f951 100644
--- a/internal/httpclient/models/recovery_link.go
+++ b/internal/httpclient/models/recovery_link.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// RecoveryLink recovery link
+// RecoveryLink RecoveryLink recovery link
 //
 // swagger:model recoveryLink
 type RecoveryLink struct {
@@ -23,6 +23,7 @@ type RecoveryLink struct {
 	//
 	// The timestamp when the recovery link expires.
 	// Format: date-time
+	// Format: date-time
 	ExpiresAt strfmt.DateTime `json:"expires_at,omitempty"`
 
 	// Recovery Link
diff --git a/internal/httpclient/models/registration_flow.go b/internal/httpclient/models/registration_flow.go
index a05a2a927..4fcc935af 100644
--- a/internal/httpclient/models/registration_flow.go
+++ b/internal/httpclient/models/registration_flow.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// RegistrationFlow RegistrationFlow RegistrationFlow registration flow
+// RegistrationFlow RegistrationFlow RegistrationFlow RegistrationFlow registration flow
 //
 // swagger:model registrationFlow
 type RegistrationFlow struct {
diff --git a/internal/httpclient/models/registration_flow_method_config.go b/internal/httpclient/models/registration_flow_method_config.go
index 393b7ba72..2f40bd065 100644
--- a/internal/httpclient/models/registration_flow_method_config.go
+++ b/internal/httpclient/models/registration_flow_method_config.go
@@ -15,7 +15,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// RegistrationFlowMethodConfig registration flow method config
+// RegistrationFlowMethodConfig RegistrationFlowMethodConfig registration flow method config
 //
 // swagger:model registrationFlowMethodConfig
 type RegistrationFlowMethodConfig struct {
diff --git a/internal/httpclient/models/revoke_session.go b/internal/httpclient/models/revoke_session.go
index e7b183a54..c88f1f912 100644
--- a/internal/httpclient/models/revoke_session.go
+++ b/internal/httpclient/models/revoke_session.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// RevokeSession RevokeSession RevokeSession RevokeSession RevokeSession RevokeSession RevokeSession RevokeSession RevokeSession RevokeSession revoke session
+// RevokeSession RevokeSession RevokeSession RevokeSession RevokeSession RevokeSession RevokeSession RevokeSession RevokeSession RevokeSession RevokeSession revoke session
 //
 // swagger:model revokeSession
 type RevokeSession struct {
diff --git a/internal/httpclient/models/session.go b/internal/httpclient/models/session.go
index 632ac3d5c..2054749b9 100644
--- a/internal/httpclient/models/session.go
+++ b/internal/httpclient/models/session.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// Session Session session
+// Session session
 //
 // swagger:model session
 type Session struct {
diff --git a/internal/httpclient/models/settings_flow.go b/internal/httpclient/models/settings_flow.go
index 22f6e0007..814a66d99 100644
--- a/internal/httpclient/models/settings_flow.go
+++ b/internal/httpclient/models/settings_flow.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// SettingsFlow Flow represents a Settings Flow
+// SettingsFlow SettingsFlow Flow represents a Settings Flow
 //
 // This flow is used when an identity wants to update settings
 // (e.g. profile data, passwords, ...) in a selfservice manner.
diff --git a/internal/httpclient/models/settings_flow_method_config.go b/internal/httpclient/models/settings_flow_method_config.go
index 5abf3d4f1..563000830 100644
--- a/internal/httpclient/models/settings_flow_method_config.go
+++ b/internal/httpclient/models/settings_flow_method_config.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// SettingsFlowMethodConfig settings flow method config
+// SettingsFlowMethodConfig SettingsFlowMethodConfig settings flow method config
 //
 // swagger:model settingsFlowMethodConfig
 type SettingsFlowMethodConfig struct {
diff --git a/internal/httpclient/models/settings_via_api_response.go b/internal/httpclient/models/settings_via_api_response.go
index 9ff008d7a..4bd2ecb0c 100644
--- a/internal/httpclient/models/settings_via_api_response.go
+++ b/internal/httpclient/models/settings_via_api_response.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// SettingsViaAPIResponse SettingsViaAPIResponse The Response for Settings Flows via API
+// SettingsViaAPIResponse SettingsViaAPIResponse SettingsViaAPIResponse The Response for Settings Flows via API
 //
 // swagger:model settingsViaApiResponse
 type SettingsViaAPIResponse struct {
diff --git a/internal/httpclient/models/state.go b/internal/httpclient/models/state.go
index b1ae09e9a..b12eafe69 100644
--- a/internal/httpclient/models/state.go
+++ b/internal/httpclient/models/state.go
@@ -11,7 +11,7 @@ import (
 	"github.com/go-openapi/strfmt"
 )
 
-// State State State State State State State State State State state
+// State State State State State State State State State State State state
 //
 // swagger:model State
 type State string
diff --git a/internal/httpclient/models/traits.go b/internal/httpclient/models/traits.go
index 9db2f9b4a..a251ecda5 100644
--- a/internal/httpclient/models/traits.go
+++ b/internal/httpclient/models/traits.go
@@ -5,7 +5,7 @@ package models
 // This file was generated by the swagger tool.
 // Editing this file might prove futile when you re-run the swagger generate command
 
-// Traits Traits Traits Traits Traits Traits Traits Traits Traits Traits traits
+// Traits Traits Traits Traits Traits Traits Traits Traits Traits Traits Traits traits
 //
 // swagger:model Traits
 type Traits interface{}
diff --git a/internal/httpclient/models/update_identity.go b/internal/httpclient/models/update_identity.go
index 96178686b..759efa4da 100644
--- a/internal/httpclient/models/update_identity.go
+++ b/internal/httpclient/models/update_identity.go
@@ -13,7 +13,7 @@ import (
 	"github.com/go-openapi/swag"
 )
 
-// UpdateIdentity UpdateIdentity UpdateIdentity UpdateIdentity UpdateIdentity UpdateIdentity UpdateIdentity UpdateIdentity UpdateIdentity UpdateIdentity update identity
+// UpdateIdentity UpdateIdentity UpdateIdentity UpdateIdentity UpdateIdentity UpdateIdentity UpdateIdentity UpdateIdentity UpdateIdentity UpdateIdentity UpdateIdentity update identity
 //
 // swagger:model UpdateIdentity
 type UpdateIdentity struct {
diff --git a/internal/httpclient/models/verifiable_address.go b/internal/httpclient/models/verifiable_address.go
index 539043d71..fc908fec5 100644
--- a/internal/httpclient/models/verifiable_address.go
+++ b/internal/httpclient/models/verifiable_address.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// VerifiableAddress VerifiableAddress VerifiableAddress VerifiableAddress VerifiableAddress VerifiableAddress VerifiableAddress VerifiableAddress VerifiableAddress VerifiableAddress verifiable address
+// VerifiableAddress VerifiableAddress VerifiableAddress VerifiableAddress VerifiableAddress VerifiableAddress VerifiableAddress VerifiableAddress VerifiableAddress VerifiableAddress VerifiableAddress verifiable address
 //
 // swagger:model VerifiableAddress
 type VerifiableAddress struct {
diff --git a/internal/httpclient/models/verifiable_address_status.go b/internal/httpclient/models/verifiable_address_status.go
index 0eab3ee3f..c84495481 100644
--- a/internal/httpclient/models/verifiable_address_status.go
+++ b/internal/httpclient/models/verifiable_address_status.go
@@ -11,7 +11,7 @@ import (
 	"github.com/go-openapi/strfmt"
 )
 
-// VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus verifiable address status
+// VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus VerifiableAddressStatus verifiable address status
 //
 // swagger:model VerifiableAddressStatus
 type VerifiableAddressStatus string
diff --git a/internal/httpclient/models/verifiable_address_type.go b/internal/httpclient/models/verifiable_address_type.go
index c21ee8ac7..518abb782 100644
--- a/internal/httpclient/models/verifiable_address_type.go
+++ b/internal/httpclient/models/verifiable_address_type.go
@@ -11,7 +11,7 @@ import (
 	"github.com/go-openapi/strfmt"
 )
 
-// VerifiableAddressType VerifiableAddressType VerifiableAddressType VerifiableAddressType VerifiableAddressType VerifiableAddressType VerifiableAddressType VerifiableAddressType VerifiableAddressType VerifiableAddressType verifiable address type
+// VerifiableAddressType VerifiableAddressType VerifiableAddressType VerifiableAddressType VerifiableAddressType VerifiableAddressType VerifiableAddressType VerifiableAddressType VerifiableAddressType VerifiableAddressType VerifiableAddressType verifiable address type
 //
 // swagger:model VerifiableAddressType
 type VerifiableAddressType string
diff --git a/internal/httpclient/models/verification_flow.go b/internal/httpclient/models/verification_flow.go
index 1980efb71..f04976eb4 100644
--- a/internal/httpclient/models/verification_flow.go
+++ b/internal/httpclient/models/verification_flow.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// VerificationFlow A Verification Flow
+// VerificationFlow VerificationFlow A Verification Flow
 //
 // Used to verify an out-of-band communication
 // channel such as an email address or a phone number.
@@ -31,6 +31,7 @@ type VerificationFlow struct {
 	// ExpiresAt is the time (UTC) when the request expires. If the user still wishes to verify the address,
 	// a new request has to be initiated.
 	// Format: date-time
+	// Format: date-time
 	ExpiresAt strfmt.DateTime `json:"expires_at,omitempty"`
 
 	// id
@@ -39,6 +40,7 @@ type VerificationFlow struct {
 
 	// IssuedAt is the time (UTC) when the request occurred.
 	// Format: date-time
+	// Format: date-time
 	IssuedAt strfmt.DateTime `json:"issued_at,omitempty"`
 
 	// messages
diff --git a/internal/httpclient/models/verification_flow_method_config.go b/internal/httpclient/models/verification_flow_method_config.go
index 03aa9cc9f..00363f302 100644
--- a/internal/httpclient/models/verification_flow_method_config.go
+++ b/internal/httpclient/models/verification_flow_method_config.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/validate"
 )
 
-// VerificationFlowMethodConfig VerificationFlowMethodConfig verification flow method config
+// VerificationFlowMethodConfig verification flow method config
 //
 // swagger:model verificationFlowMethodConfig
 type VerificationFlowMethodConfig struct {
diff --git a/internal/httpclient/models/version.go b/internal/httpclient/models/version.go
index 14a1bf599..3f700bb2d 100644
--- a/internal/httpclient/models/version.go
+++ b/internal/httpclient/models/version.go
@@ -12,7 +12,7 @@ import (
 	"github.com/go-openapi/swag"
 )
 
-// Version Version Version Version Version version
+// Version Version Version Version Version Version version
 //
 // swagger:model version
 type Version struct {
diff --git a/persistence/sql/persister_courier.go b/persistence/sql/persister_courier.go
index 458cabc33..cbc6cc797 100644
--- a/persistence/sql/persister_courier.go
+++ b/persistence/sql/persister_courier.go
@@ -3,10 +3,13 @@ package sql
 import (
 	"context"
 	"database/sql"
+	"fmt"
 
 	"github.com/gofrs/uuid"
 	"github.com/pkg/errors"
 
+	"github.com/ory/kratos/corp"
+
 	"github.com/ory/x/sqlcon"
 
 	"github.com/ory/kratos/courier"
@@ -54,7 +57,11 @@ func (p *Persister) LatestQueuedMessage(ctx context.Context) (*courier.Message,
 }
 
 func (p *Persister) SetMessageStatus(ctx context.Context, id uuid.UUID, ms courier.MessageStatus) error {
-	count, err := p.GetConnection(ctx).RawQuery("UPDATE courier_messages SET status = ? WHERE id = ?", ms, id).ExecWithCount()
+	count, err := p.GetConnection(ctx).RawQuery(
+		fmt.Sprintf(
+			"UPDATE %s SET status = ? WHERE id = ?",
+			corp.ContextualizeTableName(ctx, "courier_messages"),
+		), ms, id).ExecWithCount()
 	if err != nil {
 		return sqlcon.HandleError(err)
 	}
diff --git a/persistence/sql/persister_errorx.go b/persistence/sql/persister_errorx.go
index 03fd04651..eb85be179 100644
--- a/persistence/sql/persister_errorx.go
+++ b/persistence/sql/persister_errorx.go
@@ -4,8 +4,11 @@ import (
 	"bytes"
 	"context"
 	"encoding/json"
+	"fmt"
 	"time"
 
+	"github.com/ory/kratos/corp"
+
 	"github.com/gofrs/uuid"
 	"github.com/pkg/errors"
 
@@ -44,7 +47,7 @@ func (p *Persister) Read(ctx context.Context, id uuid.UUID) (*errorx.ErrorContai
 		return nil, sqlcon.HandleError(err)
 	}
 
-	if err := p.GetConnection(ctx).RawQuery("UPDATE selfservice_errors SET was_seen = true, seen_at = ? WHERE id = ?", time.Now().UTC(), id).Exec(); err != nil {
+	if err := p.GetConnection(ctx).RawQuery(fmt.Sprintf("UPDATE %s SET was_seen = true, seen_at = ? WHERE id = ?", corp.ContextualizeTableName(ctx, "selfservice_errors")), time.Now().UTC(), id).Exec(); err != nil {
 		return nil, sqlcon.HandleError(err)
 	}
 
@@ -53,9 +56,9 @@ func (p *Persister) Read(ctx context.Context, id uuid.UUID) (*errorx.ErrorContai
 
 func (p *Persister) Clear(ctx context.Context, olderThan time.Duration, force bool) (err error) {
 	if force {
-		err = p.GetConnection(ctx).RawQuery("DELETE FROM selfservice_errors WHERE seen_at < ? AND seen_at IS NOT NULL", olderThan).Exec()
+		err = p.GetConnection(ctx).RawQuery(fmt.Sprintf("DELETE FROM %s WHERE seen_at < ? AND seen_at IS NOT NULL", corp.ContextualizeTableName(ctx, "selfservice_errors")), olderThan).Exec()
 	} else {
-		err = p.GetConnection(ctx).RawQuery("DELETE FROM selfservice_errors WHERE was_seen=true AND seen_at < ? AND seen_at IS NOT NULL", time.Now().UTC().Add(-olderThan)).Exec()
+		err = p.GetConnection(ctx).RawQuery(fmt.Sprintf("DELETE FROM %s WHERE was_seen=true AND seen_at < ? AND seen_at IS NOT NULL", corp.ContextualizeTableName(ctx, "selfservice_errors")), time.Now().UTC().Add(-olderThan)).Exec()
 	}
 
 	return sqlcon.HandleError(err)
diff --git a/persistence/sql/persister_identity.go b/persistence/sql/persister_identity.go
index 3dd5be6ce..5d03c9b80 100644
--- a/persistence/sql/persister_identity.go
+++ b/persistence/sql/persister_identity.go
@@ -7,6 +7,8 @@ import (
 	"strings"
 	"time"
 
+	"github.com/ory/kratos/corp"
+
 	"github.com/ory/jsonschema/v3"
 	"github.com/ory/x/sqlxx"
 
@@ -59,13 +61,17 @@ func (p *Persister) FindByCredentialsIdentifier(ctx context.Context, ct identity
 		match = strings.ToLower(match)
 	}
 
-	if err := p.GetConnection(ctx).RawQuery(`SELECT
+	if err := p.GetConnection(ctx).RawQuery(fmt.Sprintf(`SELECT
     ic.identity_id
-FROM identity_credentials ic
-         INNER JOIN identity_credential_types ict on ic.identity_credential_type_id = ict.id
-         INNER JOIN identity_credential_identifiers ici on ic.id = ici.identity_credential_id
+FROM %s ic
+         INNER JOIN %s ict on ic.identity_credential_type_id = ict.id
+         INNER JOIN %s ici on ic.id = ici.identity_credential_id
 WHERE ici.identifier = ?
-  AND ict.name = ?`, match, ct).First(&find); err != nil {
+  AND ict.name = ?`,
+		corp.ContextualizeTableName(ctx, "identity_credentials"),
+		corp.ContextualizeTableName(ctx, "identity_credential_types"),
+		corp.ContextualizeTableName(ctx, "identity_credential_identifiers"),
+	), match, ct).First(&find); err != nil {
 		if errors.Cause(err) == sql.ErrNoRows {
 			return nil, nil, herodot.ErrNotFound.WithTrace(err).WithReasonf(`No identity matching credentials identifier "%s" could be found.`, match)
 		}
diff --git a/persistence/sql/persister_session.go b/persistence/sql/persister_session.go
index e07197370..de802a8ab 100644
--- a/persistence/sql/persister_session.go
+++ b/persistence/sql/persister_session.go
@@ -2,6 +2,9 @@ package sql
 
 import (
 	"context"
+	"fmt"
+
+	"github.com/ory/kratos/corp"
 
 	"github.com/gofrs/uuid"
 
@@ -37,7 +40,10 @@ func (p *Persister) DeleteSession(ctx context.Context, sid uuid.UUID) error {
 }
 
 func (p *Persister) DeleteSessionsByIdentity(ctx context.Context, identityID uuid.UUID) error {
-	if err := p.GetConnection(ctx).RawQuery("DELETE FROM sessions WHERE identity_id = ?", identityID).Exec(); err != nil {
+	if err := p.GetConnection(ctx).RawQuery(fmt.Sprintf(
+		"DELETE FROM %s WHERE identity_id = ?",
+		corp.ContextualizeTableName(ctx, "sessions"),
+	), identityID).Exec(); err != nil {
 		return sqlcon.HandleError(err)
 	}
 	return nil
@@ -60,14 +66,20 @@ func (p *Persister) GetSessionByToken(ctx context.Context, token string) (*sessi
 }
 
 func (p *Persister) DeleteSessionByToken(ctx context.Context, token string) error {
-	if err := p.GetConnection(ctx).RawQuery("DELETE FROM sessions WHERE token = ?", token).Exec(); err != nil {
+	if err := p.GetConnection(ctx).RawQuery(fmt.Sprintf(
+		"DELETE FROM %s WHERE token = ?",
+		corp.ContextualizeTableName(ctx, "sessions"),
+	), token).Exec(); err != nil {
 		return sqlcon.HandleError(err)
 	}
 	return nil
 }
 
 func (p *Persister) RevokeSessionByToken(ctx context.Context, token string) error {
-	if err := p.GetConnection(ctx).RawQuery("UPDATE sessions SET active = false WHERE token = ?", token).Exec(); err != nil {
+	if err := p.GetConnection(ctx).RawQuery(fmt.Sprintf(
+		"UPDATE %s SET active = false WHERE token = ?",
+		corp.ContextualizeTableName(ctx, "sessions"),
+	), token).Exec(); err != nil {
 		return sqlcon.HandleError(err)
 	}
 	return nil
diff --git a/selfservice/errorx/persistence.go b/selfservice/errorx/persistence.go
index 8960bb16a..9f5fdf3ed 100644
--- a/selfservice/errorx/persistence.go
+++ b/selfservice/errorx/persistence.go
@@ -35,15 +35,13 @@ type (
 	}
 )
 
-func TestPersister(p Persister) func(t *testing.T) {
+func TestPersister(ctx context.Context, p Persister) func(t *testing.T) {
 	toJSON := func(t *testing.T, in interface{}) string {
 		out, err := json.Marshal(in)
 		require.NoError(t, err)
 		return string(out)
 	}
 
-	ctx := context.Background()
-
 	return func(t *testing.T) {
 		t.Run("case=not found", func(t *testing.T) {
 			_, err := p.Read(ctx, x.NewUUID())
diff --git a/selfservice/flow/login/persistence.go b/selfservice/flow/login/persistence.go
index 9a1d4eaa6..35b1da67d 100644
--- a/selfservice/flow/login/persistence.go
+++ b/selfservice/flow/login/persistence.go
@@ -28,7 +28,7 @@ type (
 	}
 )
 
-func TestFlowPersister(p FlowPersister) func(t *testing.T) {
+func TestFlowPersister(ctx context.Context, p FlowPersister) func(t *testing.T) {
 	var clearids = func(r *Flow) {
 		r.ID = uuid.UUID{}
 		for k := range r.Methods {
@@ -36,7 +36,6 @@ func TestFlowPersister(p FlowPersister) func(t *testing.T) {
 		}
 	}
 
-	ctx := context.Background()
 	return func(t *testing.T) {
 		t.Run("case=should error when the login flow does not exist", func(t *testing.T) {
 			_, err := p.GetLoginFlow(ctx, x.NewUUID())
diff --git a/selfservice/flow/recovery/persistence.go b/selfservice/flow/recovery/persistence.go
index 514d9b671..7f4b3b294 100644
--- a/selfservice/flow/recovery/persistence.go
+++ b/selfservice/flow/recovery/persistence.go
@@ -28,7 +28,7 @@ type (
 	}
 )
 
-func TestFlowPersister(conf *config.Config, p interface {
+func TestFlowPersister(ctx context.Context, conf *config.Config, p interface {
 	FlowPersister
 	identity.PrivilegedPool
 }) func(t *testing.T) {
@@ -36,7 +36,6 @@ func TestFlowPersister(conf *config.Config, p interface {
 		r.ID = uuid.UUID{}
 	}
 
-	ctx := context.Background()
 	return func(t *testing.T) {
 		conf.MustSet(config.ViperKeyDefaultIdentitySchemaURL, "file://./stub/identity.schema.json")
 
diff --git a/selfservice/flow/registration/persistence.go b/selfservice/flow/registration/persistence.go
index 55b4ed7b2..a005dc453 100644
--- a/selfservice/flow/registration/persistence.go
+++ b/selfservice/flow/registration/persistence.go
@@ -26,7 +26,7 @@ type FlowPersistenceProvider interface {
 	RegistrationFlowPersister() FlowPersister
 }
 
-func TestFlowPersister(p FlowPersister) func(t *testing.T) {
+func TestFlowPersister(ctx context.Context, p FlowPersister) func(t *testing.T) {
 	var clearids = func(r *Flow) {
 		r.ID = uuid.UUID{}
 		for k := range r.Methods {
@@ -34,7 +34,6 @@ func TestFlowPersister(p FlowPersister) func(t *testing.T) {
 		}
 	}
 
-	ctx := context.Background()
 	return func(t *testing.T) {
 		t.Run("case=should error when the registration flow does not exist", func(t *testing.T) {
 			_, err := p.GetRegistrationFlow(ctx, x.NewUUID())
diff --git a/selfservice/flow/settings/hook.go b/selfservice/flow/settings/hook.go
index a1b37970f..8685721ec 100644
--- a/selfservice/flow/settings/hook.go
+++ b/selfservice/flow/settings/hook.go
@@ -2,11 +2,12 @@ package settings
 
 import (
 	"fmt"
-	"github.com/ory/kratos/schema"
-	"github.com/ory/x/sqlcon"
 	"net/http"
 	"time"
 
+	"github.com/ory/kratos/schema"
+	"github.com/ory/x/sqlcon"
+
 	"github.com/pkg/errors"
 	"github.com/sirupsen/logrus"
 
diff --git a/selfservice/flow/settings/persistence.go b/selfservice/flow/settings/persistence.go
index 043724c6f..d161fbb44 100644
--- a/selfservice/flow/settings/persistence.go
+++ b/selfservice/flow/settings/persistence.go
@@ -28,7 +28,7 @@ type (
 	}
 )
 
-func TestRequestPersister(conf *config.Config, p interface {
+func TestRequestPersister(ctx context.Context, conf *config.Config, p interface {
 	FlowPersister
 	identity.PrivilegedPool
 }) func(t *testing.T) {
@@ -38,7 +38,6 @@ func TestRequestPersister(conf *config.Config, p interface {
 		r.IdentityID = uuid.UUID{}
 	}
 
-	ctx := context.Background()
 	return func(t *testing.T) {
 		conf.MustSet(config.ViperKeyDefaultIdentitySchemaURL, "file://./stub/identity.schema.json")
 
diff --git a/selfservice/flow/verification/persistence.go b/selfservice/flow/verification/persistence.go
index 5da9e2686..b752b499d 100644
--- a/selfservice/flow/verification/persistence.go
+++ b/selfservice/flow/verification/persistence.go
@@ -28,7 +28,7 @@ type (
 	}
 )
 
-func TestFlowPersister(conf *config.Config, p interface {
+func TestFlowPersister(ctx context.Context, conf *config.Config, p interface {
 	FlowPersister
 	identity.PrivilegedPool
 }) func(t *testing.T) {
@@ -36,7 +36,6 @@ func TestFlowPersister(conf *config.Config, p interface {
 		r.ID = uuid.UUID{}
 	}
 
-	ctx := context.Background()
 	return func(t *testing.T) {
 		conf.MustSet(config.ViperKeyDefaultIdentitySchemaURL, "file://./stub/identity.schema.json")
 
diff --git a/selfservice/strategy/link/persister_conformity.go b/selfservice/strategy/link/persister_conformity.go
index 68bf5581c..9925f0312 100644
--- a/selfservice/strategy/link/persister_conformity.go
+++ b/selfservice/strategy/link/persister_conformity.go
@@ -19,14 +19,13 @@ import (
 	"github.com/ory/kratos/x"
 )
 
-func TestPersister(conf *config.Config, p interface {
+func TestPersister(ctx context.Context, conf *config.Config, p interface {
 	RecoveryTokenPersister
 	VerificationTokenPersister
 	recovery.FlowPersister
 	verification.FlowPersister
 	identity.PrivilegedPool
 }) func(t *testing.T) {
-	ctx := context.Background()
 	return func(t *testing.T) {
 		conf.MustSet(config.ViperKeyDefaultIdentitySchemaURL, "file://./stub/identity.schema.json")
 		conf.MustSet(config.ViperKeySecretsDefault, []string{"secret-a", "secret-b"})
diff --git a/session/persistence.go b/session/persistence.go
index 407117885..6d3dbfa1a 100644
--- a/session/persistence.go
+++ b/session/persistence.go
@@ -47,11 +47,10 @@ type Persister interface {
 	RevokeSessionByToken(ctx context.Context, token string) error
 }
 
-func TestPersister(conf *config.Config, p interface {
+func TestPersister(ctx context.Context, conf *config.Config, p interface {
 	Persister
 	identity.PrivilegedPool
 }) func(t *testing.T) {
-	ctx := context.Background()
 	return func(t *testing.T) {
 		conf.MustSet(config.ViperKeyDefaultIdentitySchemaURL, "file://./stub/identity.schema.json")
 


Test patch:
diff --git a/persistence/sql/persister_test.go b/persistence/sql/persister_test.go
index 2575932d1..bcdb17b92 100644
--- a/persistence/sql/persister_test.go
+++ b/persistence/sql/persister_test.go
@@ -8,6 +8,8 @@ import (
 	"sync"
 	"testing"
 
+	"github.com/ory/kratos/corpx"
+
 	"github.com/ory/kratos/driver"
 
 	"github.com/go-errors/errors"
@@ -45,7 +47,7 @@ import (
 var sqlite = fmt.Sprintf("sqlite3://%s.sqlite?_fk=true&mode=rwc", filepath.Join(os.TempDir(), uuid.New().String()))
 
 func init() {
-	internal.RegisterFakes()
+	corpx.RegisterFakes()
 	// op.Debug = true
 }
 
@@ -140,6 +142,7 @@ func createCleanDatabases(t *testing.T) map[string]*driver.RegistryDefault {
 
 func TestPersister(t *testing.T) {
 	conns := createCleanDatabases(t)
+	ctx := context.Background()
 
 	for name, reg := range conns {
 		t.Run(fmt.Sprintf("database=%s", name), func(t *testing.T) {
@@ -149,47 +152,47 @@ func TestPersister(t *testing.T) {
 			t.Logf("DSN: %s", conf.DSN())
 			t.Run("contract=identity.TestPool", func(t *testing.T) {
 				pop.SetLogger(pl(t))
-				identity.TestPool(conf, p)(t)
+				identity.TestPool(ctx, conf, p)(t)
 			})
 			t.Run("contract=registration.TestFlowPersister", func(t *testing.T) {
 				pop.SetLogger(pl(t))
-				registration.TestFlowPersister(p)(t)
+				registration.TestFlowPersister(ctx, p)(t)
 			})
 			t.Run("contract=errorx.TestPersister", func(t *testing.T) {
 				pop.SetLogger(pl(t))
-				errorx.TestPersister(p)(t)
+				errorx.TestPersister(ctx, p)(t)
 			})
 			t.Run("contract=login.TestFlowPersister", func(t *testing.T) {
 				pop.SetLogger(pl(t))
-				login.TestFlowPersister(p)(t)
+				login.TestFlowPersister(ctx, p)(t)
 			})
 			t.Run("contract=settings.TestFlowPersister", func(t *testing.T) {
 				pop.SetLogger(pl(t))
-				settings.TestRequestPersister(conf, p)(t)
+				settings.TestRequestPersister(ctx, conf, p)(t)
 			})
 			t.Run("contract=session.TestFlowPersister", func(t *testing.T) {
 				pop.SetLogger(pl(t))
-				session.TestPersister(conf, p)(t)
+				session.TestPersister(ctx, conf, p)(t)
 			})
 			t.Run("contract=courier.TestPersister", func(t *testing.T) {
 				pop.SetLogger(pl(t))
-				courier.TestPersister(p)(t)
+				courier.TestPersister(ctx, p)(t)
 			})
 			t.Run("contract=verification.TestPersister", func(t *testing.T) {
 				pop.SetLogger(pl(t))
-				verification.TestFlowPersister(conf, p)(t)
+				verification.TestFlowPersister(ctx, conf, p)(t)
 			})
 			t.Run("contract=recovery.TestFlowPersister", func(t *testing.T) {
 				pop.SetLogger(pl(t))
-				recovery.TestFlowPersister(conf, p)(t)
+				recovery.TestFlowPersister(ctx, conf, p)(t)
 			})
 			t.Run("contract=link.TestPersister", func(t *testing.T) {
 				pop.SetLogger(pl(t))
-				link.TestPersister(conf, p)(t)
+				link.TestPersister(ctx, conf, p)(t)
 			})
 			t.Run("contract=continuity.TestPersister", func(t *testing.T) {
 				pop.SetLogger(pl(t))
-				continuity.TestPersister(p)(t)
+				continuity.TestPersister(ctx, p)(t)
 			})
 		})
 	}
diff --git a/selfservice/flow/login/handler_test.go b/selfservice/flow/login/handler_test.go
index 2166366e8..1f5b13495 100644
--- a/selfservice/flow/login/handler_test.go
+++ b/selfservice/flow/login/handler_test.go
@@ -9,6 +9,8 @@ import (
 	"testing"
 	"time"
 
+	"github.com/ory/kratos/corpx"
+
 	"github.com/gobuffalo/httptest"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
@@ -26,7 +28,7 @@ import (
 )
 
 func init() {
-	internal.RegisterFakes()
+	corpx.RegisterFakes()
 }
 
 func TestInitFlow(t *testing.T) {
diff --git a/selfservice/flow/recovery/handler_test.go b/selfservice/flow/recovery/handler_test.go
index 1e384f9c9..02165868c 100644
--- a/selfservice/flow/recovery/handler_test.go
+++ b/selfservice/flow/recovery/handler_test.go
@@ -9,6 +9,8 @@ import (
 	"testing"
 	"time"
 
+	"github.com/ory/kratos/corpx"
+
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 	"github.com/tidwall/gjson"
@@ -25,7 +27,7 @@ import (
 )
 
 func init() {
-	internal.RegisterFakes()
+	corpx.RegisterFakes()
 }
 
 func TestHandlerRedirectOnAuthenticated(t *testing.T) {
diff --git a/selfservice/flow/registration/handler_test.go b/selfservice/flow/registration/handler_test.go
index 749c7a0a0..66eccd445 100644
--- a/selfservice/flow/registration/handler_test.go
+++ b/selfservice/flow/registration/handler_test.go
@@ -9,6 +9,8 @@ import (
 	"testing"
 	"time"
 
+	"github.com/ory/kratos/corpx"
+
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 	"github.com/tidwall/gjson"
@@ -25,7 +27,7 @@ import (
 )
 
 func init() {
-	internal.RegisterFakes()
+	corpx.RegisterFakes()
 }
 
 func TestHandlerRedirectOnAuthenticated(t *testing.T) {
diff --git a/selfservice/flow/settings/handler_test.go b/selfservice/flow/settings/handler_test.go
index 60227173e..7e2877292 100644
--- a/selfservice/flow/settings/handler_test.go
+++ b/selfservice/flow/settings/handler_test.go
@@ -7,6 +7,8 @@ import (
 	"testing"
 	"time"
 
+	"github.com/ory/kratos/corpx"
+
 	"github.com/ory/x/ioutilx"
 
 	"github.com/stretchr/testify/assert"
@@ -29,7 +31,7 @@ import (
 )
 
 func init() {
-	internal.RegisterFakes()
+	corpx.RegisterFakes()
 }
 
 func TestHandler(t *testing.T) {
diff --git a/selfservice/hook/session_destroyer_test.go b/selfservice/hook/session_destroyer_test.go
index fe92ae894..078ee0637 100644
--- a/selfservice/hook/session_destroyer_test.go
+++ b/selfservice/hook/session_destroyer_test.go
@@ -5,6 +5,8 @@ import (
 	"net/http"
 	"testing"
 
+	"github.com/ory/kratos/corpx"
+
 	"github.com/bxcodec/faker/v3"
 	"github.com/gobuffalo/httptest"
 	"github.com/gofrs/uuid"
@@ -20,7 +22,7 @@ import (
 )
 
 func init() {
-	internal.RegisterFakes()
+	corpx.RegisterFakes()
 }
 
 func TestSessionDestroyer(t *testing.T) {
diff --git a/selfservice/strategy/link/strategy_recovery_test.go b/selfservice/strategy/link/strategy_recovery_test.go
index 635c9279c..4dd213fa8 100644
--- a/selfservice/strategy/link/strategy_recovery_test.go
+++ b/selfservice/strategy/link/strategy_recovery_test.go
@@ -8,6 +8,8 @@ import (
 	"testing"
 	"time"
 
+	"github.com/ory/kratos/corpx"
+
 	"github.com/ory/x/ioutilx"
 
 	"github.com/stretchr/testify/assert"
@@ -36,7 +38,7 @@ import (
 )
 
 func init() {
-	internal.RegisterFakes()
+	corpx.RegisterFakes()
 }
 
 func TestAdminStrategy(t *testing.T) {
diff --git a/selfservice/strategy/oidc/strategy_settings_test.go b/selfservice/strategy/oidc/strategy_settings_test.go
index e0555dfb7..0ceea2ca5 100644
--- a/selfservice/strategy/oidc/strategy_settings_test.go
+++ b/selfservice/strategy/oidc/strategy_settings_test.go
@@ -9,6 +9,8 @@ import (
 	"testing"
 	"time"
 
+	"github.com/ory/kratos/corpx"
+
 	"github.com/gofrs/uuid"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
@@ -33,7 +35,7 @@ import (
 )
 
 func init() {
-	internal.RegisterFakes()
+	corpx.RegisterFakes()
 }
 
 var (
diff --git a/selfservice/strategy/password/settings_test.go b/selfservice/strategy/password/settings_test.go
index 90d5bf74f..68ba2ba0e 100644
--- a/selfservice/strategy/password/settings_test.go
+++ b/selfservice/strategy/password/settings_test.go
@@ -10,6 +10,8 @@ import (
 	"strings"
 	"testing"
 
+	"github.com/ory/kratos/corpx"
+
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 	"github.com/tidwall/gjson"
@@ -31,7 +33,7 @@ import (
 )
 
 func init() {
-	internal.RegisterFakes()
+	corpx.RegisterFakes()
 }
 
 func newIdentityWithPassword(email string) *identity.Identity {
diff --git a/selfservice/strategy/profile/strategy_test.go b/selfservice/strategy/profile/strategy_test.go
index f447fceb9..ca814f918 100644
--- a/selfservice/strategy/profile/strategy_test.go
+++ b/selfservice/strategy/profile/strategy_test.go
@@ -13,6 +13,8 @@ import (
 	"testing"
 	"time"
 
+	"github.com/ory/kratos/corpx"
+
 	"github.com/julienschmidt/httprouter"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
@@ -36,7 +38,7 @@ import (
 )
 
 func init() {
-	internal.RegisterFakes()
+	corpx.RegisterFakes()
 }
 
 func newIdentityWithPassword(email string) *identity.Identity {
diff --git a/session/handler_test.go b/session/handler_test.go
index 389708115..b39d8b654 100644
--- a/session/handler_test.go
+++ b/session/handler_test.go
@@ -8,6 +8,8 @@ import (
 	"testing"
 	"time"
 
+	"github.com/ory/kratos/corpx"
+
 	"github.com/julienschmidt/httprouter"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
@@ -27,7 +29,7 @@ import (
 )
 
 func init() {
-	internal.RegisterFakes()
+	corpx.RegisterFakes()
 }
 
 func send(code int) httprouter.Handle {