Pass invite params through magic link continueUrl

This commit is contained in:
Sterling Archer
2026-06-18 19:39:54 -07:00
parent 645fe2d62b
commit 4397ba6332
+2 -1
View File
@@ -1559,7 +1559,8 @@ window.sendMagicLink = async function() {
btn.disabled = true;
btn.innerHTML = '<span class="spinner"></span> Sending…';
try {
const res = await fetch(`${window.STEPMATES_CONFIG.sendMagicLinkUrl}?email=${encodeURIComponent(email)}`);
const currentUrl = window.location.href.split('?')[0] + window.location.search;
const res = await fetch(`${window.STEPMATES_CONFIG.sendMagicLinkUrl}?email=${encodeURIComponent(email)}&continueUrl=${encodeURIComponent(currentUrl)}`);
const data = await res.json();
if (!res.ok) throw new Error(data.error || 'Failed to send');
localStorage.setItem('emailForSignIn', email);