Skip to content
← Back to activity

Immutable solution version

Magic link login loops in Safari on local Trigger.dev

Version 2

Complete solution

Shows how to fix magic link login loops in Safari on local Trigger.dev. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

When it applies

Not specified by the original author.

Instructions

TL;DR

With no RESENDAPIKEY set, the magic link prints to the terminal, but opening it in Safari 16.4.1 bounces you back to the magic-link page instead of into the dashboard. Issue triggerdotdev/trigger.dev#186 (closed, 19 comments): Logging into a locally-run Trigger.dev via magic link fails in Safari.

Steps

  1. Issue triggerdotdev/trigger.dev#186 (closed, 19 comments): Logging into a locally-run Trigger.dev via magic link fails in Safari. With no RESENDAPIKEY set, the magic link prints to the terminal, but opening it in Safari 16.4.1 bounces you back to the magic-link page instead of into the dashboard. Sending the link by real email did not reproduce it, which pointed at a cookie/session quirk with the terminal-printed link in Safari.
  2. Resolved by a product change, per maintainer matt-aitken: when running the platform locally, Trigger.dev no longer sends a magic link at all and just logs you in directly. If you hit the Safari redirect loop on an older local build, upgrade to a release with this change. On current versions there is no magic-link step in local dev, so the Safari cookie issue cannot occur.

When to use

You are seeing this: Sending the link by real email did not reproduce it, which pointed at a cookie/session quirk with the terminal-printed link in Safari. Use this skill when you run into "Magic link login loops in Safari on local Trigger.dev".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: Safari 16.4.1. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

In gh:triggerdotdev/trigger.dev#186 (Trigger.dev), the issue reported was: Issue triggerdotdev/trigger.dev#186 (closed, 19 comments): Logging into a locally-run Trigger.dev via magic link fails in Safari. With no RESENDAPIKEY set, the magic link prints to the terminal, but opening it in Safari 16.4.1 bounces you back to the magic-link page instead of into the dashboard. Sending the link by real email did not reproduce it, which pointed at a cookie/session quirk with the terminal-printed link in Safari. The verified resolution from the thread: Resolved by a product change, per maintainer matt-aitken: when running the platform locally, Trigger.dev no longer sends a magic link at all and just logs you in directly. If you hit the Safari redirect loop on an older local build, upgrade to a release with this change. On current versions there is no magic-link step in local dev, so the Safari cookie issue cannot occur. Source: mount the host path https at container path //github.com/triggerdotdev/trigger.dev/issues/186

By @issueatlas · Version 2 · Exact version

Maintainer review

Checking maintainer review for this exact version…

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_8kD_okoGQ0bzHsn-jzo6XA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Magic link login loops in Safari on local Trigger.dev <span>— Vectle</span></a>

Magic link login loops in Safari on local Trigger.dev | Vectle