[GH-ISSUE #3238] [bug]: OAuth does not work with HTTPS #1074

Closed
opened 2026-03-16 18:23:45 +03:00 by kerem · 1 comment
Owner

Originally created by @AhmedmmAli on GitHub (Aug 4, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3238

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

I have installed hoppscotch self-hosted and deployed on a VM behind a proxy and when I'm trying to login with MS or GitHub or any OAuth, it keep failing and return unauthorized 401
.env example
`
#Microsoft Auth Config
MICROSOFT_CLIENT_ID=""
MICROSOFT_CLIENT_SECRET="
"
MICROSOFT_CALLBACK_URL="https://hoppscotch-backend.example.net/v1/auth/microsoft/callback"
MICROSOFT_SCOPE="user.read"
MICROSOFT_TENANT="************"
#Base URLs

VITE_BASE_URL=https://hoppscotch.example.net/
VITE_SHORTCODE_BASE_URL=https://hoppscotch.example.net/
VITE_ADMIN_URL=https://hoppscotch-admin.example.net/

#Backend URLs

VITE_BACKEND_GQL_URL=https://hoppscotch-backend.example.net/graphql
VITE_BACKEND_WS_URL=ws://hoppscotch-backend.example.net/graphql
VITE_BACKEND_API_URL=https://hoppscotch-backend.example.net/v1
`

Steps to reproduce

1- Install hoposcotch behind a revers proxy with SSL applied

Environment

Production

Version

Self-hosted

Originally created by @AhmedmmAli on GitHub (Aug 4, 2023). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3238 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior I have installed hoppscotch self-hosted and deployed on a VM behind a proxy and when I'm trying to login with MS or GitHub or any OAuth, it keep failing and return unauthorized 401 .env example ` #Microsoft Auth Config MICROSOFT_CLIENT_ID="************" MICROSOFT_CLIENT_SECRET="************" MICROSOFT_CALLBACK_URL="https://hoppscotch-backend.example.net/v1/auth/microsoft/callback" MICROSOFT_SCOPE="user.read" MICROSOFT_TENANT="************" #Base URLs VITE_BASE_URL=https://hoppscotch.example.net/ VITE_SHORTCODE_BASE_URL=https://hoppscotch.example.net/ VITE_ADMIN_URL=https://hoppscotch-admin.example.net/ #Backend URLs VITE_BACKEND_GQL_URL=https://hoppscotch-backend.example.net/graphql VITE_BACKEND_WS_URL=ws://hoppscotch-backend.example.net/graphql VITE_BACKEND_API_URL=https://hoppscotch-backend.example.net/v1 ` ### Steps to reproduce 1- Install hoposcotch behind a revers proxy with SSL applied ### Environment Production ### Version Self-hosted
kerem 2026-03-16 18:23:45 +03:00
Author
Owner

@liyasthomas commented on GitHub (Aug 5, 2023):

Hi @AhmedmmAli, to better understand the issue, can you answer the following?

  • Have you read and followed the instruction explained in the Self-Hosting documentation?
  • Have you read and populated the complete list of prerequisites as explained in the documentation?
  • Please provide the complete contents of your .env file, you should mask all sensitive environment variables (eg. CLIENT_SECRET).
<!-- gh-comment-id:1666464409 --> @liyasthomas commented on GitHub (Aug 5, 2023): Hi @AhmedmmAli, to better understand the issue, can you answer the following? - Have you read and followed the instruction explained in the [Self-Hosting documentation](https://docs.hoppscotch.io/documentation/self-host/getting-started)? - Have you read and populated the complete list of [prerequisites](https://docs.hoppscotch.io/documentation/self-host/prerequisites) as explained in the documentation? - Please provide the complete contents of your `.env` file, you should mask all sensitive environment variables (eg. `CLIENT_SECRET`).
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#1074
No description provided.