Skip to content
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

401 Unauthorized – status: interstitial, reason: cross-origin-referrer #1740

Closed
3 tasks done
fanckush opened this issue Sep 18, 2023 · 1 comment
Closed
3 tasks done

Comments

@fanckush
Copy link

Preliminary Checks

Reproduction / Replay Link

https://github.com/fanckush/clerk-bug-error-401/tree/main

Publishable key

pk_test_aW50ZW5zZS1naG91bC00OS5jbGVyay5hY2NvdW50cy5kZXYk

Description

Steps to reproduce:

  1. Install dependencies (yarn install)
  2. run dev server (yarn dev)
  3. open localhost:3000
  4. either you get an infinite refresh loop. or press the button image
  5. check the console and network tab and notice the 401 error
image

The error seems to be coming from

import { ClerkExpressWithAuth } from "@clerk/clerk-sdk-node";

interestingly, if instead of running the dev server you build the app and preview it, then the error is gone
to try this out

  1. yarn build to build the web app
  2. yarn preview to serve it

Environment

System:
    OS: macOS 14.0
    CPU: (8) arm64 Apple M1 Pro
    Memory: 188.38 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.4.0 - /opt/homebrew/bin/node
    Yarn: 3.3.0 - /opt/homebrew/bin/yarn
    npm: 9.7.2 - /opt/homebrew/bin/npm
    pnpm: 8.5.1 - /opt/homebrew/bin/pnpm
  Browsers:
    Brave Browser: 117.1.58.124
    Safari: 17.0
  npmPackages:
    @clerk/clerk-sdk-node: ^4.12.5 => 4.12.5 
    @nuxt/devtools: latest => 0.8.3 
    nuxt: ^3.7.3 => 3.7.3
@fanckush fanckush added the needs-triage A ticket that needs to be triaged by a team member label Sep 18, 2023
@fanckush
Copy link
Author

fanckush commented Sep 21, 2023

closing as this turned out to be an issue where nuxtis incorrectly setting the x-forwarded-proto header to an invalid value which in turn is causing clerk to give this error

@LekoArts LekoArts removed the needs-triage A ticket that needs to be triaged by a team member label Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants