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

feat(authentication): configurable magicLink dispatch URI, magic token consumption endpoint #722

Merged
merged 7 commits into from
Oct 10, 2023

Conversation

kon14
Copy link
Contributor

@kon14 kon14 commented Oct 10, 2023

This PR introduces a configurable magic link dispatch URI config option for customizing magic token consumption.
When provided, magic token emails will link to the specified address, instead of the default magic token hook endpoint.

I've also introduced some str nullity check fixes as well as workarounds for trailing slashes.

This PR also modifies internal redirectUri behavior.
These are no longer appended to the magic link as query params and are retrieved from the token doc instead.
Non-overriden redirectUri values are intentionally not stored in token.data and coalesced back into latest config values during token retrieval (in hook endpoint).

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other (please describe)

Does this PR introduce a breaking change?

  • Yes
  • No

The PR fulfills these requirements:

  • It's submitted to the main branch
  • When resolving a specific issue, it's referenced in the PR's description (e.g. fix #xxx, where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature

@ghost
Copy link

ghost commented Oct 10, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@kkopanidis kkopanidis merged commit 64d4714 into main Oct 10, 2023
4 checks passed
@kkopanidis kkopanidis deleted the magic-link-additions branch October 10, 2023 09:56
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.

2 participants