Skip to content

Conversation

@marcnnn
Copy link
Contributor

@marcnnn marcnnn commented Jul 29, 2025

This change allows adding claims to magic links by passing them in context

Documentation is missing because I think the Ash Team will have opinions about this change.

After finding the correct solution that works for everyone, I will add the Documentation.

This change allows adding claims to magic links by passing them in context

Documentation is missing because I think the Ash Team will have opinions about this change.

After finding the correct solution that works for everyone, I will add the Documentation.
when is_struct(strategy, __MODULE__) do
context_map = Map.from_struct(context)
source_context = Map.get(context_map, :source_context, %{})
context_claims = Map.get(source_context, :claims, %{})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm...I think we'd have to stew on this one. Likely if we do this the name here would need to be much more specific though, like :magic_link_token_claims for example.

@jimsynz thoughts?

Copy link
Collaborator

@jimsynz jimsynz Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well if we're doing to do this I think we should make it consistent for any action that generates a token (ie modify GenerateTokenChange to have the same behaviour).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants