Skip to content

Pass through transient data to webhooks on registration #3102

@CaptainStandby

Description

@CaptainStandby

Preflight checklist

Describe your problem

It would be helpful to be able pass additional data from the signup process to a handler for the registration webhook without utilising traits.

This could be used to implement this flow as an example, which stores a cookie consent given at signup in the metadata_public for the user:

Describe your ideal solution

Add an extra field to theUpdateRegistrationFlowWithPasswordMethod struct here.
Something like this:

type UpdateRegistrationFlowWithPasswordMethod struct {
	// ...

	// Extra data to pass along to any webhooks
	//
	// required: false
	Extra json.RawMessage `json:"extra"`
}

This field could be validated to contain well formed json and then passed as is to the webhook endpoint.

Workarounds or alternatives

Traits could be used but have some disadvantages:

  1. traits are a permanent part of the schema although the data might be transient
  2. traits will be stored in Kratos
  3. users will be able to see and modify the traits

Version

v0.11.1

Additional Context

No response

Metadata

Metadata

Labels

featNew feature or request.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions