Skip to content

fix(clerk-js): Make email-link return to application instead of AP#2727

Merged
dimkl merged 3 commits into
mainfrom
dimkl/handshake-email-link
Feb 6, 2024
Merged

fix(clerk-js): Make email-link return to application instead of AP#2727
dimkl merged 3 commits into
mainfrom
dimkl/handshake-email-link

Conversation

@dimkl

@dimkl dimkl commented Feb 5, 2024

Copy link
Copy Markdown
Contributor

Description

In this PR we have applied 3 changes:

  • retrieving the signInUrl from the context in the email-link flow
  • make the path-based the default routing strategy when building redirect urls
  • populate the signInUrl in the context

Using those changes we can proceed with fixing handshake for the email-link flow.

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Packages affected

  • @clerk/backend
  • @clerk/chrome-extension
  • @clerk/clerk-js
  • @clerk/clerk-expo
  • @clerk/fastify
  • gatsby-plugin-clerk
  • @clerk/localizations
  • @clerk/nextjs
  • @clerk/clerk-react
  • @clerk/remix
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/themes
  • @clerk/types
  • build/tooling/chore

@dimkl dimkl self-assigned this Feb 5, 2024
@changeset-bot

changeset-bot Bot commented Feb 5, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 892b3cd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Minor
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dimkl dimkl marked this pull request as draft February 5, 2024 15:34
@dimkl dimkl force-pushed the dimkl/handshake-email-link branch from 870197b to 5d7b661 Compare February 5, 2024 20:19
@dimkl dimkl marked this pull request as ready for review February 5, 2024 20:19
Comment thread packages/clerk-js/src/ui/common/redirects.ts
dimkl and others added 3 commits February 6, 2024 14:27
The signInUrl used in email-link will be retrieved from the props or
context or repo-level or display config (with the same priority as
listed here).
In applications that the sign-in url is defined the
email-link verification will redirect to the application without passing
through the AP first. This results in fixing the handshake for email-
link flows.
Note: Applications using the signInUrl from the Dashboard settings, will
not support the handshake flow and would require an additional redirect
to FAPI/v1/client/handshake on email-link verification to work.
@dimkl dimkl force-pushed the dimkl/handshake-email-link branch from 4623e63 to 892b3cd Compare February 6, 2024 12:28
@dimkl dimkl enabled auto-merge February 6, 2024 12:42
@dimkl dimkl added this pull request to the merge queue Feb 6, 2024
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Feb 6, 2024
@dimkl dimkl added this pull request to the merge queue Feb 6, 2024
Merged via the queue into main with commit 5d6937c Feb 6, 2024
@dimkl dimkl deleted the dimkl/handshake-email-link branch February 6, 2024 12:58
@dimkl dimkl mentioned this pull request Feb 8, 2024
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants