[GH-ISSUE #3016] [bug]: Not work magic-link #982

Closed
opened 2026-03-16 17:56:12 +03:00 by kerem · 6 comments
Owner

Originally created by @eljump on GitHub (Apr 25, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3016

Originally assigned to: @mirarifhasan on GitHub.

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

Hello!
I really like your application, and I decided to try deploying it on a VPS.
I'm trying to log in via email, but when I click on the magic link, I get a 404 error screen.
Could you help me?

my .env is:

DATABASE_URL=#######

# Auth Tokens Config
JWT_SECRET="secret1233"
TOKEN_SALT_COMPLEXITY=10
MAGIC_LINK_TOKEN_VALIDITY=3
REFRESH_TOKEN_VALIDITY="604800000" # Default validity is 7 days (604800000 ms) in ms
ACCESS_TOKEN_VALIDITY="86400000" # Default validity is 1 day (86400000 ms) in ms
SESSION_SECRET='add some secret here'

# Hoppscotch App Domain Config
REDIRECT_URL="http://hoppscotch.webest.ru:3000"
WHITELISTED_ORIGINS="http://hoppscotch.webest.ru:3170,http://hoppscotch.webest.ru:3000,http://hoppscotch.webest.ru:3100"

# Google Auth Config
GOOGLE_CLIENT_ID="*"
GOOGLE_CLIENT_SECRET="*"
GOOGLE_CALLBACK_URL="http://hoppscotch.webest.ru:3170/v1/auth/google/callback"
GOOGLE_SCOPE="email,profile"

# Github Auth Config
GITHUB_CLIENT_ID="*"
GITHUB_CLIENT_SECRET="*"
GITHUB_CALLBACK_URL="http://hoppscotch.webest.ru:3170/v1/auth/github/callback"
GITHUB_SCOPE="user:email"

# Microsoft Auth Config
MICROSOFT_CLIENT_ID="*"
MICROSOFT_CLIENT_SECRET="*"
MICROSOFT_CALLBACK_URL="http://hoppscotch.webest.ru:3170/v1/auth/microsoft/callback"
MICROSOFT_SCOPE="user.read"

# Mailer config
MAILER_SMTP_URL="#####"
MAILER_ADDRESS_FROM="####"

# Rate Limit Config
RATE_LIMIT_TTL=60# In seconds
RATE_LIMIT_MAX=100# Max requests per IP


#-----------------------Frontend Config------------------------------#


# Base URLs
VITE_BASE_URL=http://hoppscotch.webest.ru:3000
VITE_SHORTCODE_BASE_URL=http://hoppscotch.webest.ru:3000
VITE_ADMIN_URL=http://hoppscotch.webest.ru:3100

# Backend URLs
VITE_BACKEND_GQL_URL=http://hoppscotch.webest.ru:3170/graphql
VITE_BACKEND_WS_URL=wss://hoppscotch.webest.ru:3170/graphql
VITE_BACKEND_API_URL=http://hoppscotch.webest.ru:3170/v1

# Terms Of Service And Privacy Policy Links (Optional)
VITE_APP_TOS_LINK=https://docs.hoppscotch.io/support/terms
VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/support/privacy

I hide some credentials by #

Steps to reproduce

I use official guide
https://docs.hoppscotch.io/documentation/self-host/install-and-build/

Environment

Production

Version

Self-hosted

Originally created by @eljump on GitHub (Apr 25, 2023). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3016 Originally assigned to: @mirarifhasan on GitHub. ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior Hello! I really like your application, and I decided to try deploying it on a VPS. I'm trying to log in via email, but when I click on the magic link, I get a 404 error screen. Could you help me? my .env is: ``` DATABASE_URL=####### # Auth Tokens Config JWT_SECRET="secret1233" TOKEN_SALT_COMPLEXITY=10 MAGIC_LINK_TOKEN_VALIDITY=3 REFRESH_TOKEN_VALIDITY="604800000" # Default validity is 7 days (604800000 ms) in ms ACCESS_TOKEN_VALIDITY="86400000" # Default validity is 1 day (86400000 ms) in ms SESSION_SECRET='add some secret here' # Hoppscotch App Domain Config REDIRECT_URL="http://hoppscotch.webest.ru:3000" WHITELISTED_ORIGINS="http://hoppscotch.webest.ru:3170,http://hoppscotch.webest.ru:3000,http://hoppscotch.webest.ru:3100" # Google Auth Config GOOGLE_CLIENT_ID="*" GOOGLE_CLIENT_SECRET="*" GOOGLE_CALLBACK_URL="http://hoppscotch.webest.ru:3170/v1/auth/google/callback" GOOGLE_SCOPE="email,profile" # Github Auth Config GITHUB_CLIENT_ID="*" GITHUB_CLIENT_SECRET="*" GITHUB_CALLBACK_URL="http://hoppscotch.webest.ru:3170/v1/auth/github/callback" GITHUB_SCOPE="user:email" # Microsoft Auth Config MICROSOFT_CLIENT_ID="*" MICROSOFT_CLIENT_SECRET="*" MICROSOFT_CALLBACK_URL="http://hoppscotch.webest.ru:3170/v1/auth/microsoft/callback" MICROSOFT_SCOPE="user.read" # Mailer config MAILER_SMTP_URL="#####" MAILER_ADDRESS_FROM="####" # Rate Limit Config RATE_LIMIT_TTL=60# In seconds RATE_LIMIT_MAX=100# Max requests per IP #-----------------------Frontend Config------------------------------# # Base URLs VITE_BASE_URL=http://hoppscotch.webest.ru:3000 VITE_SHORTCODE_BASE_URL=http://hoppscotch.webest.ru:3000 VITE_ADMIN_URL=http://hoppscotch.webest.ru:3100 # Backend URLs VITE_BACKEND_GQL_URL=http://hoppscotch.webest.ru:3170/graphql VITE_BACKEND_WS_URL=wss://hoppscotch.webest.ru:3170/graphql VITE_BACKEND_API_URL=http://hoppscotch.webest.ru:3170/v1 # Terms Of Service And Privacy Policy Links (Optional) VITE_APP_TOS_LINK=https://docs.hoppscotch.io/support/terms VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/support/privacy ``` I hide some credentials by # ### Steps to reproduce I use official guide https://docs.hoppscotch.io/documentation/self-host/install-and-build/ ### Environment Production ### Version Self-hosted
kerem 2026-03-16 17:56:12 +03:00
Author
Owner

@binhluong2012 commented on GitHub (Apr 26, 2023):

I have the same issue. Got email with magic link, but click it redirect to 404 page.

<!-- gh-comment-id:1522666453 --> @binhluong2012 commented on GitHub (Apr 26, 2023): I have the same issue. Got email with magic link, but click it redirect to 404 page.
Author
Owner

@eljump commented on GitHub (Apr 27, 2023):

Also i try to realize github auth, but get 401
image

Upd: now i have work redirect, without 401, but i still not auth
image

<!-- gh-comment-id:1524892064 --> @eljump commented on GitHub (Apr 27, 2023): Also i try to realize github auth, but get 401 ![image](https://user-images.githubusercontent.com/45133615/234782898-d6a8ec92-8280-4adf-a853-7af1c907b695.png) Upd: now i have work redirect, without 401, but i still not auth <img width="1134" alt="image" src="https://user-images.githubusercontent.com/45133615/234801414-995ff93d-ac70-4fb2-a1d6-ae25ef19dd10.png">
Author
Owner

@balub commented on GitHub (May 1, 2023):

@eljump I noticed in your .env file that the first URL in your WHITELISTED_ORIGINS is invalid WHITELISTED_ORIGINS="http://hoppscotch.webest.ru::3170...... can you change it to WHITELISTED_ORIGINS="http://hoppscotch.webest.ru:3170,..... and try again ?

<!-- gh-comment-id:1529714032 --> @balub commented on GitHub (May 1, 2023): @eljump I noticed in your `.env` file that the first URL in your `WHITELISTED_ORIGINS` is invalid `WHITELISTED_ORIGINS="http://hoppscotch.webest.ru::3170......` can you change it to `WHITELISTED_ORIGINS="http://hoppscotch.webest.ru:3170,.....` and try again ?
Author
Owner

@eljump commented on GitHub (May 2, 2023):

hoppscotch.webest.ru::3170,

@balub
Yeah, i already found this and replace, but it doesn't help

<!-- gh-comment-id:1530920100 --> @eljump commented on GitHub (May 2, 2023): > hoppscotch.webest.ru::3170, @balub Yeah, i already found this and replace, but it doesn't help
Author
Owner

@eljump commented on GitHub (May 10, 2023):

Hi again,
I switched to the release/2023.4.2 branch for testing, but the authorization still fails. The 404 screen is gone.

<!-- gh-comment-id:1541436148 --> @eljump commented on GitHub (May 10, 2023): Hi again, I switched to the release/2023.4.2 branch for testing, but the authorization still fails. The 404 screen is gone.
Author
Owner

@eljump commented on GitHub (May 11, 2023):

@balub @mirarifhasan

Hi again, I switched to the release/2023.4.2 branch for testing, but the authorization still fails. The 404 screen is gone.

<!-- gh-comment-id:1543393099 --> @eljump commented on GitHub (May 11, 2023): @balub @mirarifhasan > Hi again, I switched to the release/2023.4.2 branch for testing, but the authorization still fails. The 404 screen is gone.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#982
No description provided.