diff --git a/packages/cloudflare-worker/package.json b/packages/cloudflare-worker/package.json index b5ce4be..77e41dd 100644 --- a/packages/cloudflare-worker/package.json +++ b/packages/cloudflare-worker/package.json @@ -4,7 +4,7 @@ "type": "git", "url": "https://github.com/PropelAuth/cloudflare-worker" }, - "version": "2.1.29", + "version": "2.1.30", "license": "MIT", "keywords": [ "auth", @@ -57,7 +57,7 @@ } }, "dependencies": { - "@propelauth/node-apis": "^2.1.29", + "@propelauth/node-apis": "^2.1.30", "jose": "^5.2.0" } } diff --git a/packages/node/package.json b/packages/node/package.json index d20018e..accf681 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -4,7 +4,7 @@ "type": "git", "url": "https://github.com/PropelAuth/node" }, - "version": "2.1.29", + "version": "2.1.30", "license": "MIT", "keywords": [ "auth", @@ -12,7 +12,7 @@ "user" ], "dependencies": { - "@propelauth/node-apis": "^2.1.29", + "@propelauth/node-apis": "^2.1.30", "jose": "^5.2.0" }, "devDependencies": { diff --git a/packages/node/test/middleware.ts b/packages/node/test/middleware.ts index 7fbc109..84dcc7e 100644 --- a/packages/node/test/middleware.ts +++ b/packages/node/test/middleware.ts @@ -15,7 +15,9 @@ import { v4 as uuid } from "uuid" import { initBaseAuth } from "../src" import { RequiredOrgInfo } from "../src/auth" -const AUTH_URL = "https://auth.example.com" +const BASE_API_URL = "https://propelauth-api.com" +const AUTH_HOSTNAME = "auth.example.com" +const AUTH_URL = "https://" + AUTH_HOSTNAME const ALGO = "RS256" afterEach(() => { @@ -372,9 +374,10 @@ async function setupTokenVerificationMetadataEndpoint() { const { publicKey, privateKey } = await generateRsaKeyPair() const apiKey = randomString() - const scope = nock(AUTH_URL) + const scope = nock(BASE_API_URL) .get("/api/v1/token_verification_metadata") .matchHeader("authorization", `Bearer ${apiKey}`) + .matchHeader("X-Propelauth-url", AUTH_HOSTNAME) .reply( 200, JSON.stringify({ @@ -388,8 +391,9 @@ async function setupTokenVerificationMetadataEndpoint() { async function setupErrorTokenVerificationMetadataEndpoint(statusCode: number) { const apiKey = randomString() - const scope = nock(AUTH_URL) + const scope = nock(BASE_API_URL) .get("/api/v1/token_verification_metadata") + .matchHeader("X-Propelauth-url", AUTH_HOSTNAME) .matchHeader("authorization", `Bearer ${apiKey}`) .reply(statusCode)