René's URL Explorer Experiment


Title: fix(webapp): restore magic link login on the login page by samejr · Pull Request #4220 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: fix(webapp): restore magic link login on the login page by samejr · Pull Request #4220 · triggerdotdev/trigger.dev

X Title: fix(webapp): restore magic link login on the login page by samejr · Pull Request #4220 · triggerdotdev/trigger.dev

Description: Summary Magic link login could appear completely broken: submitting your email on the login page showed a stale "This email is unauthorized" error instead of the "we've sent you a magic link" confirmation, even when the address was fine. This PR reverts #4215 (whose diagnosis and fix turned out to be wrong) and fixes the actual bug, which was in how login errors are stored and consumed. Root cause Two session bugs compounded on the login page: The /login loader read the flashed auth:error without committing the session. A Remix flash is only consumed when the session is committed after the read, so once any attempt flashed an error (for example an address rejected on an instance with WHITELISTED_EMAILS set), it stayed in the session cookie and reappeared on every later /login visit, making successful attempts look like failures. The /login/magic action stored its validation and rate limit errors with session.set, which survives every later read and commit, so those errors stuck permanently. #4215 had instead diagnosed a server-only module leaking into the client bundle and crashing navigation. Checking the shipped images' client bundles via their sourcemaps shows .server modules were always stubbed out, so that change fixed nothing and is reverted here. Fix /login reads the flashed error and commits the session when one was present, so an error renders once and clears. The redirectTo branch now surfaces the error too instead of leaving it in the cookie. /login/magic flashes its errors instead of setting them. Verified end-to-end on a live preview environment: a rejected address shows the error once and a reload clears it; a valid address lands on the confirmation screen with the address named; GitHub, Google, and SSO login paths are untouched by this diff.

Open Graph Description: Summary Magic link login could appear completely broken: submitting your email on the login page showed a stale "This email is unauthorized" error instead of the "we've sent you ...

X Description: Summary Magic link login could appear completely broken: submitting your email on the login page showed a stale "This email is unauthorized" error instead of the "we&...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/pull/4220

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:624742c6-921d-4857-afa7-cf156c25fcb8
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB386:3ACD90:877E75:C93FAF:6AFAFD1D
html-safe-nonce4e4049a95353dd4ce000aaf86efd0cf0322bcee499ca48be1458884836b4c4d4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzg2OjNBQ0Q5MDo4NzdFNzU6QzkzRkFGOjZBRkFGRDFEIiwidmlzaXRvcl9pZCI6IjY0NTY5NTM2NDU4OTkxMTk5MDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac014cbc4b404f2fdb8d678fac286b192284031344d858f2d35ffa0b385c69fca8
hovercard-subject-tagpull_request:4027766663
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/triggerdotdev/trigger.dev/pull/4220/files
twitter:imagehttps://avatars.githubusercontent.com/u/7555566?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/7555566?s=400&v=4
og:image:altSummary Magic link login could appear completely broken: submitting your email on the login page showed a stale "This email is unauthorized" error instead of the "we've sent you ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None54f7a6886649661c85eee945cca0773566bfb4065370e0429b7c8f7204184650
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git
octolytics-dimension-user_id95297378
octolytics-dimension-user_logintriggerdotdev
octolytics-dimension-repository_id572570113
octolytics-dimension-repository_nwotriggerdotdev/trigger.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id572570113
octolytics-dimension-repository_network_root_nwotriggerdotdev/trigger.dev
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecf8450eb633ec589502c42ff6f4072e40db65da3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/4220/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4220%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4220%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4220/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4220/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4220/files
triggerdotdevhttps://github.com/triggerdotdev
trigger.devhttps://github.com/triggerdotdev/trigger.dev
Codehttps://github.com/triggerdotdev/trigger.dev
Issues203 (203)https://github.com/triggerdotdev/trigger.dev/issues
Pull requests67 (67)https://github.com/triggerdotdev/trigger.dev/pulls
Discussionshttps://github.com/triggerdotdev/trigger.dev/discussions
Actionshttps://github.com/triggerdotdev/trigger.dev/actions
Projectshttps://github.com/triggerdotdev/trigger.dev/projects
Security and quality39 (39)https://github.com/triggerdotdev/trigger.dev/security
Insightshttps://github.com/triggerdotdev/trigger.dev/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
samejrhttps://github.com/samejr
mainhttps://github.com/triggerdotdev/trigger.dev/tree/main
samejr/revert-login-magic-link-fixhttps://github.com/triggerdotdev/trigger.dev/tree/samejr/revert-login-magic-link-fix
Conversation 12 https://github.com/triggerdotdev/trigger.dev/pull/4220
Commits 5 https://github.com/triggerdotdev/trigger.dev/pull/4220/commits
Checks 36 https://github.com/triggerdotdev/trigger.dev/pull/4220/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/4220/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4220/files
fix(webapp): restore magic link login on the login page https://github.com/triggerdotdev/trigger.dev/pull/4220/files#top
Show all changes 5 commits https://github.com/triggerdotdev/trigger.dev/pull/4220/files
dad37ef Revert "fix(webapp): show magic link confirmation instead of reloadin… samejr Jul 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4220/commits/dad37efffdbb7203667c987a3958c7bb44065169
8e20947 fix(webapp): stop stale login errors reappearing on the login page samejr Jul 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4220/commits/8e209479b18bdd6fe6d90bf17a0190ccb9ae4847
f35965c fix(webapp): drop text-wrap:balance from magic link confirmation copy samejr Jul 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4220/commits/f35965c067983656c6eb909d7761d3fbc3e1eb72
fbdedf7 fix(webapp): clearer login error when WHITELISTED_EMAILS rejects an a… samejr Jul 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4220/commits/fbdedf7b3c624f64ee948637e5768e677a2a3485
32c2bdf fix(webapp): also clear stale auth errors stored by the previous sess… samejr Jul 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4220/commits/32c2bdfbb7c36a0e6d9e799ab709df449c7d1ae7
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/4220/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4220/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4220/files
clearer-whitelist-login-error.md https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-fd53a6e461835e0cd4b75eca1169d34e3f81af189e731ef2a13f9d531947bd75
consume-stale-login-errors.md https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-98af19a82d21f0a24351a9ea1a03807bb85ff7fc3b1833f662b14c2406ae1d3d
route.tsx https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-73536e111f3a95606d381657b7e111a952e4af502eef0bb13403e06488024036
magicLinkEmailCookie.server.ts https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-3e231623c5f41aa267974b3369b4a03a599115f7f25593cadd36125b68425637
route.tsx https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-592a74cf974d5188b0d087b78a8d64dc766d1ea47a59321125f719ad03eb3be3
emailAuth.server.tsx https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-6a16a542c837d73d912207e88738eb567526705c8b7055470d10a0287518d80d
email.ts https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-fd29c4d5c0cb7e9f7153eebc25d27adb809c016bb88a852bc97a9182d6546148
.server-changes/clearer-whitelist-login-error.mdhttps://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-fd53a6e461835e0cd4b75eca1169d34e3f81af189e731ef2a13f9d531947bd75
View file https://github.com/triggerdotdev/trigger.dev/blob/32c2bdfbb7c36a0e6d9e799ab709df449c7d1ae7/.server-changes/clearer-whitelist-login-error.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4220/{{ revealButtonHref }}
.server-changes/consume-stale-login-errors.mdhttps://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-98af19a82d21f0a24351a9ea1a03807bb85ff7fc3b1833f662b14c2406ae1d3d
View file https://github.com/triggerdotdev/trigger.dev/blob/32c2bdfbb7c36a0e6d9e799ab709df449c7d1ae7/.server-changes/consume-stale-login-errors.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4220/{{ revealButtonHref }}
apps/webapp/app/routes/login._index/route.tsxhttps://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-73536e111f3a95606d381657b7e111a952e4af502eef0bb13403e06488024036
View file https://github.com/triggerdotdev/trigger.dev/blob/32c2bdfbb7c36a0e6d9e799ab709df449c7d1ae7/apps/webapp/app/routes/login._index/route.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4220/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-73536e111f3a95606d381657b7e111a952e4af502eef0bb13403e06488024036
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-73536e111f3a95606d381657b7e111a952e4af502eef0bb13403e06488024036
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-73536e111f3a95606d381657b7e111a952e4af502eef0bb13403e06488024036
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4220/files
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-73536e111f3a95606d381657b7e111a952e4af502eef0bb13403e06488024036
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4220/files
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-73536e111f3a95606d381657b7e111a952e4af502eef0bb13403e06488024036
apps/webapp/app/routes/login.magic/magicLinkEmailCookie.server.tshttps://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-3e231623c5f41aa267974b3369b4a03a599115f7f25593cadd36125b68425637
View file https://github.com/triggerdotdev/trigger.dev/blob/32c2bdfbb7c36a0e6d9e799ab709df449c7d1ae7/apps/webapp/app/routes/login.magic/magicLinkEmailCookie.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4220/{{ revealButtonHref }}
apps/webapp/app/routes/login.magic/route.tsxhttps://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-592a74cf974d5188b0d087b78a8d64dc766d1ea47a59321125f719ad03eb3be3
View file https://github.com/triggerdotdev/trigger.dev/blob/32c2bdfbb7c36a0e6d9e799ab709df449c7d1ae7/apps/webapp/app/routes/login.magic/route.tsx
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4220/files
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4220/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-592a74cf974d5188b0d087b78a8d64dc766d1ea47a59321125f719ad03eb3be3
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-592a74cf974d5188b0d087b78a8d64dc766d1ea47a59321125f719ad03eb3be3
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-592a74cf974d5188b0d087b78a8d64dc766d1ea47a59321125f719ad03eb3be3
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-592a74cf974d5188b0d087b78a8d64dc766d1ea47a59321125f719ad03eb3be3
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-592a74cf974d5188b0d087b78a8d64dc766d1ea47a59321125f719ad03eb3be3
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-592a74cf974d5188b0d087b78a8d64dc766d1ea47a59321125f719ad03eb3be3
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-592a74cf974d5188b0d087b78a8d64dc766d1ea47a59321125f719ad03eb3be3
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-592a74cf974d5188b0d087b78a8d64dc766d1ea47a59321125f719ad03eb3be3
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-592a74cf974d5188b0d087b78a8d64dc766d1ea47a59321125f719ad03eb3be3
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-592a74cf974d5188b0d087b78a8d64dc766d1ea47a59321125f719ad03eb3be3
apps/webapp/app/services/emailAuth.server.tsxhttps://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-6a16a542c837d73d912207e88738eb567526705c8b7055470d10a0287518d80d
View file https://github.com/triggerdotdev/trigger.dev/blob/32c2bdfbb7c36a0e6d9e799ab709df449c7d1ae7/apps/webapp/app/services/emailAuth.server.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4220/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-6a16a542c837d73d912207e88738eb567526705c8b7055470d10a0287518d80d
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-6a16a542c837d73d912207e88738eb567526705c8b7055470d10a0287518d80d
apps/webapp/app/utils/email.tshttps://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-fd29c4d5c0cb7e9f7153eebc25d27adb809c016bb88a852bc97a9182d6546148
View file https://github.com/triggerdotdev/trigger.dev/blob/32c2bdfbb7c36a0e6d9e799ab709df449c7d1ae7/apps/webapp/app/utils/email.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4220/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4220/files#diff-fd29c4d5c0cb7e9f7153eebc25d27adb809c016bb88a852bc97a9182d6546148
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.