-
-
Notifications
You must be signed in to change notification settings - Fork 591
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
Localhost magic link redirect on Safari (MacOS) #1384
Comments
same here, Safari 18.1 (20619.2.8.11.10) / macOS 15.1 / trigger.dev docker 3.1.1 |
Are you both testing this on localhost? Webapp and worker on the same machine or split setup? Likely an env var issue as it worked fine when I just tried it with:
I'd start fresh an see after which step it fails, my guess is it's one of these env vars:
For a completely fresh start, you can nuke your DB, reset your .env and pull in any changes like so:
|
This doesn’t explain why it works on Chrome but not on Safari. |
Ah right, I didn't see that part! This sounds familiar - I think we had an issue with magic links on Safari before. #186 |
I found TRIGGER_PROTOCOL env not working when I set WEBAPP_PUBLISH_IP=192.168.1.x. It still runs on local , but magic link always generate https link even set TRIGGER_PROTOCOL=http. |
I don't think that |
@nicktrn I use the full setup to self-host Trigger.dev on a home server. I set WEBAPP_PUBLISH_IP=192.168.1.x to allow another client PC to access it via http://192.168.1.x:3040. |
Okay, I tracked this down to the external package we're using for magic link auth. It sets the protocol to "https" unless you're accessing the webapp via "localhost" or "127.0.0.1". I don't see us changing this because it's very niche. You could solve both problems quite easily if you're only accessing the webapp locally and have no need to secure logins. Setting An alternative would be to access the webapp only via the external domain, even when accessing on your local network. |
@nicktrn Thank you for help! |
Provide environment information
System:
OS: macOS 14.4.1
CPU: (8) arm64 Apple M2
Memory: 77.13 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.2.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.7.0 - /opt/homebrew/bin/npm
Describe the bug
In safari Browser on mac after you click on the magic link from the email the browser redirect you to the login page ]
http://localhost:3040/login?redirectTo=%2F
which show you the login page again.This works without issues in chrome. I get redirected to
http://localhost:3040/confirm-basic-details
Reproduction repo
https://github.com/triggerdotdev/docker
To reproduce
git clone https://github.com/triggerdotdev/docker
cd docker
cp .env.example .env
follow the self hosting tutorial in the doc to set .env
..
./start.sh
go to http://localhost:3040/ in Safari (MacOs)
create account and check your email.
click on the magic link
Additional information
No response
The text was updated successfully, but these errors were encountered: