http://localhost:3000 redirect after deploy at fly.io (after Clerk auth)
Closed this issue · 3 comments
Hello everyone,
First of all, I apologize in advance if my questions seem basic - I'm still learning and I'm very much in the beginner stages.
I've been following the README instructions of my project meticulously.
Everything works perfectly fine local, and I have successfully deployed the application to Fly.io.
However, things take a turn for the worse when I attempt to log in. After entering my credentials (Clerk), I get redirected to this URL:
Unfortunately, it leads to nowhere and I'm at a loss as to what went wrong. I understand that there is something amiss with my setup, but being a novice, I'm unable to pinpoint the exact problem.
I would greatly appreciate it if anyone could offer some guidance or insights on this.
Thank you so much in advance for your time and patience!
Ah! I should really add this to FAQ
You can fix this by adding CLERK_USE_X_FWD_HEADERS=true
to .env.local (or .env.prod) and deploy again. Please let me know if it works!
Thanks you very much, resolved! Very appreciated.
Hi @ykhli! Thank you for the fix. It helped me to get rid of the same problem (redirection to localhost), but now I get port 80 in my URL. When I manually delete ":80" from the URL, redirection works. Can you please help me try to find a solution to this problem?
Fly.io was down for some time yesterday, so I launched the project using Google Cloud Run.
The URL looks like this: https://ai-bro-5oxslodcwq-uc.a.run.app:80/sign-in?redirect_url=https%3A%2F%2Fai-bro-5oxslodcwq-uc.a.run.app%3A80%2F#__clerk_db_jwt[eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXYiOiJkdmJfMlNtQXNodkYyN0dkdkF4UnRyekw2SnZJOTB6In0.Xq2T0PdayYJqOOFvOaapXNC7neWD-_1pbvNTniRWkG9QaUGL3x8soWOpvfQyRFXUOJpOXMbzViEFWQIbxgiWaRJH3pt9QU9K96fVFVh8ctT8czcH6b5zivwhAUwRLUrhi4DUlanFa7kvEiHskMX7lYTrag2hqLEXriSTx-OxEy606HEPPv3C5RYCZWVFyIOT_h5sreSfBX7oZH77AWq1LggKP-NcZzXNVXLx72LH_Zg1PLv8lSwDIz1sKxUPFxhThWX_EZpCkXI0zTbjIogFtqj8Ae60jFsdkeqqlOYwbmGZ802S_8Jw9VTnAh-ZwE_IBuRrVaBSb09i8kBcDvmvOQ]