Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass through transient data to webhooks on registration #3102

Closed
6 tasks done
CaptainStandby opened this issue Feb 14, 2023 · 0 comments · Fixed by #3104
Closed
6 tasks done

Pass through transient data to webhooks on registration #3102

CaptainStandby opened this issue Feb 14, 2023 · 0 comments · Fixed by #3104
Assignees
Labels
feat New feature or request.

Comments

@CaptainStandby
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant