[GH-ISSUE #3483] [bug]: Auth providers show although they are deactivated #1179

Closed
opened 2026-03-16 19:00:30 +03:00 by kerem · 3 comments
Owner

Originally created by @Breee on GitHub (Oct 31, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3483

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

Our current setup is:

  • hoppscotch/hoppscotch-frontend:2023.8.2
  • hoppscotch/hoppscotch-backend:2023.8.2
  • hoppscotch/hoppscotch-admin:2023.8.2

we have set:

VITE_ALLOWED_AUTH_PROVIDERS="MICROSOFT"

In the admin frontend this works as expected:

admin

In the frontend not:

hopp

Steps to reproduce

  1. Set VITE_ALLOWED_AUTH_PROVIDERS="MICROSOFT"
  2. Click login in the frontend/admin frontend

Full config example:

backend:
  image:
    name: hoppscotch/hoppscotch-backend
    # renovate: datasource=docker depName=hoppscotch/hoppscotch versioning=semver
    version: 2023.8.2
  config:
    ports:
      http: 3170
    env:
    - name: JWT_SECRET
      value: "${JWT_SECRET}"
    - name: TOKEN_SALT_COMPLEXITY
      value: "10"
    - name: MAGIC_LINK_TOKEN_VALIDITY
      value: "3"
    - name: REFRESH_TOKEN_VALIDITY
      value: "604800000" # Default validity is 7 days (604800000 ms) in ms
    - name: ACCESS_TOKEN_VALIDITY
      value: "86400000" # Default validity is 1 day (86400000 ms) in ms
    - name: SESSION_SECRET
      value: "${SESSION_SECRET}"
    - name: REDIRECT_URL
      value: "https://${DNS_NAME}.example.com"
    - name: WHITELISTED_ORIGINS
      value: "https://backend.${DNS_NAME}.example.com,https://${DNS_NAME}.example.com,https://shadmin.${DNS_NAME}.example.com"
    - name: VITE_ALLOWED_AUTH_PROVIDERS
      value: MICROSOFT
    - name: MICROSOFT_CLIENT_ID
      value: ${MICROSOFT_CLIENT_ID}
    - name: MICROSOFT_CLIENT_SECRET
      value: ${MICROSOFT_CLIENT_SECRET}
    - name: MICROSOFT_CALLBACK_URL
      value: https://backend.${DNS_NAME}.example.com/v1/auth/microsoft/callback
    - name: MICROSOFT_SCOPE
      value: "user.read"
    - name: MICROSOFT_TENANT
      value: ${TERRAFORM_AZURE_TENANT_ID}
    - name: RATE_LIMIT_TTL
      value: "60"
    - name: RATE_LIMIT_MAX
      value: "100"
    - name : MAILER_SMTP_URL
      value: "smtps://${MAIL_SENDER}:${NETWORK_PASS}@${MAILHUB}"
    - name: MAILER_ADDRESS_FROM
      value: "From hoppscotch"
  resources:
    requests:
      memory: "1000Mi"
      cpu: "1000m"
    limits:
      memory: "2Gi"
      cpu: "2000m"
  livenessProbe:
    enabled: true
  readinessProbe:
    enabled: true

server:
  image:
    name: hoppscotch/hoppscotch-frontend
    # renovate: datasource=docker depName=hoppscotch/hoppscotch versioning=semver
    version: 2023.8.2
  config:
    ports:
      http: 8080
    env:
    - name: VITE_BASE_URL
      value: "https://${DNS_NAME}.example.com"
    - name: VITE_SHORTCODE_BASE_URL
      value: "https://${DNS_NAME}.example.com"
    - name: VITE_ADMIN_URL
      value: "https://admin.${DNS_NAME}.example.com"
    - name: VITE_BACKEND_GQL_URL
      value: "https://backend.${DNS_NAME}.example.com/graphql"
    - name: VITE_BACKEND_WS_URL
      value: "wss://backend.${DNS_NAME}.example.com/graphql"
    - name: VITE_BACKEND_API_URL
      value: "https://backend.${DNS_NAME}.example.com/v1"
    - name: VITE_APP_TOS_LINK
      value: "https://docs.hoppscotch.io/support/terms"
    - name: VITE_APP_PRIVACY_POLICY_LINK
      value: "https://docs.hoppscotch.io/support/privacy"
    - name: VITE_ALLOWED_AUTH_PROVIDERS
      value: MICROSOFT
  resources:
    requests:
      memory: "512Mi"
      cpu: "1000m"
    limits:
      memory: "1Gi"
      cpu: "2000m"

shadmin:
  image:
    name: hoppscotch/hoppscotch-admin
    # renovate: datasource=docker depName=hoppscotch/hoppscotch versioning=semver
    version: 2023.8.2
  config:
    ports:
      http: 8080
    env:
    - name: VITE_BASE_URL
      value: "https://${DNS_NAME}.example.com"
    - name: VITE_SHORTCODE_BASE_URL
      value: "https://${DNS_NAME}.example.com"
    - name: VITE_ADMIN_URL
      value: "https://shadmin.${DNS_NAME}.example.com"
    - name: VITE_BACKEND_GQL_URL
      value: "https://backend.${DNS_NAME}.example.com/graphql"
    - name: VITE_BACKEND_WS_URL
      value: "wss://backend.${DNS_NAME}.example.com/graphql"
    - name: VITE_BACKEND_API_URL
      value: "https://backend.${DNS_NAME}.example.com/v1"
    - name: VITE_APP_TOS_LINK
      value: "https://docs.hoppscotch.io/support/terms"
    - name: VITE_APP_PRIVACY_POLICY_LINK
      value: "https://docs.hoppscotch.io/support/privacy"
    - name: VITE_ALLOWED_AUTH_PROVIDERS
      value: MICROSOFT
  resources:
    requests:
      memory: "512Mi"
      cpu: "1000m"
    limits:
      memory: "1Gi"
      cpu: "2000m"

Environment

Production

Version

Self-hosted

Originally created by @Breee on GitHub (Oct 31, 2023). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3483 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior Our current setup is: - hoppscotch/hoppscotch-frontend:2023.8.2 - hoppscotch/hoppscotch-backend:2023.8.2 - hoppscotch/hoppscotch-admin:2023.8.2 we have set: ``` VITE_ALLOWED_AUTH_PROVIDERS="MICROSOFT" ``` In the admin frontend this works as expected: ![admin](https://github.com/hoppscotch/hoppscotch/assets/11966385/05000f58-c73f-4c8d-a529-57d6fb85b291) In the frontend not: ![hopp](https://github.com/hoppscotch/hoppscotch/assets/11966385/7d17abb9-de91-4918-ac97-c26430b40b47) ### Steps to reproduce 1. Set VITE_ALLOWED_AUTH_PROVIDERS="MICROSOFT" 2. Click login in the frontend/admin frontend Full config example: ``` backend: image: name: hoppscotch/hoppscotch-backend # renovate: datasource=docker depName=hoppscotch/hoppscotch versioning=semver version: 2023.8.2 config: ports: http: 3170 env: - name: JWT_SECRET value: "${JWT_SECRET}" - name: TOKEN_SALT_COMPLEXITY value: "10" - name: MAGIC_LINK_TOKEN_VALIDITY value: "3" - name: REFRESH_TOKEN_VALIDITY value: "604800000" # Default validity is 7 days (604800000 ms) in ms - name: ACCESS_TOKEN_VALIDITY value: "86400000" # Default validity is 1 day (86400000 ms) in ms - name: SESSION_SECRET value: "${SESSION_SECRET}" - name: REDIRECT_URL value: "https://${DNS_NAME}.example.com" - name: WHITELISTED_ORIGINS value: "https://backend.${DNS_NAME}.example.com,https://${DNS_NAME}.example.com,https://shadmin.${DNS_NAME}.example.com" - name: VITE_ALLOWED_AUTH_PROVIDERS value: MICROSOFT - name: MICROSOFT_CLIENT_ID value: ${MICROSOFT_CLIENT_ID} - name: MICROSOFT_CLIENT_SECRET value: ${MICROSOFT_CLIENT_SECRET} - name: MICROSOFT_CALLBACK_URL value: https://backend.${DNS_NAME}.example.com/v1/auth/microsoft/callback - name: MICROSOFT_SCOPE value: "user.read" - name: MICROSOFT_TENANT value: ${TERRAFORM_AZURE_TENANT_ID} - name: RATE_LIMIT_TTL value: "60" - name: RATE_LIMIT_MAX value: "100" - name : MAILER_SMTP_URL value: "smtps://${MAIL_SENDER}:${NETWORK_PASS}@${MAILHUB}" - name: MAILER_ADDRESS_FROM value: "From hoppscotch" resources: requests: memory: "1000Mi" cpu: "1000m" limits: memory: "2Gi" cpu: "2000m" livenessProbe: enabled: true readinessProbe: enabled: true server: image: name: hoppscotch/hoppscotch-frontend # renovate: datasource=docker depName=hoppscotch/hoppscotch versioning=semver version: 2023.8.2 config: ports: http: 8080 env: - name: VITE_BASE_URL value: "https://${DNS_NAME}.example.com" - name: VITE_SHORTCODE_BASE_URL value: "https://${DNS_NAME}.example.com" - name: VITE_ADMIN_URL value: "https://admin.${DNS_NAME}.example.com" - name: VITE_BACKEND_GQL_URL value: "https://backend.${DNS_NAME}.example.com/graphql" - name: VITE_BACKEND_WS_URL value: "wss://backend.${DNS_NAME}.example.com/graphql" - name: VITE_BACKEND_API_URL value: "https://backend.${DNS_NAME}.example.com/v1" - name: VITE_APP_TOS_LINK value: "https://docs.hoppscotch.io/support/terms" - name: VITE_APP_PRIVACY_POLICY_LINK value: "https://docs.hoppscotch.io/support/privacy" - name: VITE_ALLOWED_AUTH_PROVIDERS value: MICROSOFT resources: requests: memory: "512Mi" cpu: "1000m" limits: memory: "1Gi" cpu: "2000m" shadmin: image: name: hoppscotch/hoppscotch-admin # renovate: datasource=docker depName=hoppscotch/hoppscotch versioning=semver version: 2023.8.2 config: ports: http: 8080 env: - name: VITE_BASE_URL value: "https://${DNS_NAME}.example.com" - name: VITE_SHORTCODE_BASE_URL value: "https://${DNS_NAME}.example.com" - name: VITE_ADMIN_URL value: "https://shadmin.${DNS_NAME}.example.com" - name: VITE_BACKEND_GQL_URL value: "https://backend.${DNS_NAME}.example.com/graphql" - name: VITE_BACKEND_WS_URL value: "wss://backend.${DNS_NAME}.example.com/graphql" - name: VITE_BACKEND_API_URL value: "https://backend.${DNS_NAME}.example.com/v1" - name: VITE_APP_TOS_LINK value: "https://docs.hoppscotch.io/support/terms" - name: VITE_APP_PRIVACY_POLICY_LINK value: "https://docs.hoppscotch.io/support/privacy" - name: VITE_ALLOWED_AUTH_PROVIDERS value: MICROSOFT resources: requests: memory: "512Mi" cpu: "1000m" limits: memory: "1Gi" cpu: "2000m" ``` ### Environment Production ### Version Self-hosted
kerem 2026-03-16 19:00:30 +03:00
Author
Owner

@Ev3rdown commented on GitHub (Nov 7, 2023):

Are you sure you it's not the frontend cache ?
You can test with an other browser/in private just to be sure.
The cache is stupidly difficult to clear, even the updates don't clear it, so if you tried using hoppscotch even only once with a different VITE_ALLOWED_AUTH_PROVIDERS, it will keep this first config forever.

<!-- gh-comment-id:1799061247 --> @Ev3rdown commented on GitHub (Nov 7, 2023): Are you sure you it's not the frontend cache ? You can test with an other browser/in private just to be sure. The cache is stupidly difficult to clear, even the updates don't clear it, so if you tried using hoppscotch even only once with a different VITE_ALLOWED_AUTH_PROVIDERS, it will keep this first config forever.
Author
Owner

@joeljstephen commented on GitHub (Apr 10, 2024):

@Breee I am unable to reproduce this issue. Can you let me know if this issue still exists for you in the latest build? If not, I will be closing this issue in a few days.

<!-- gh-comment-id:2047497144 --> @joeljstephen commented on GitHub (Apr 10, 2024): @Breee I am unable to reproduce this issue. Can you let me know if this issue still exists for you in the latest build? If not, I will be closing this issue in a few days.
Author
Owner

@Breee commented on GitHub (Apr 18, 2024):

Sorry for the late reply - the issue was resolved by clearing the frontend cache.
however, there should be some kind of cache invalidation from hoppscotch side - as i don't find it valid to force my users to clear their caches - that's just my opinion tho

<!-- gh-comment-id:2063080113 --> @Breee commented on GitHub (Apr 18, 2024): Sorry for the late reply - the issue was resolved by clearing the frontend cache. however, there should be some kind of cache invalidation from hoppscotch side - as i don't find it valid to force my users to clear their caches - that's just my opinion tho
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#1179
No description provided.