rename back
Some checks failed
all-good: Did all the other checks pass? / all-good (push) Has been cancelled
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Has been cancelled
Docker Emulator Test / docker (push) Has been cancelled
Docker Server Build and Push / Docker Build and Push Server (push) Has been cancelled
Docker Server Test / docker (push) Has been cancelled
Runs E2E API Tests / build (22.x) (push) Has been cancelled
Lint & build / lint_and_build (latest) (push) Has been cancelled
Preview Docs / run (push) Has been cancelled
Dev Environment Test / restart-dev-and-test (push) Has been cancelled
Run setup tests / setup-tests (push) Has been cancelled
TOC Generator / TOC Generator (push) Has been cancelled
Update pull request branches / Update pull request branches (push) Has been cancelled

This commit is contained in:
Zai Shi 2025-05-26 14:08:50 -07:00
parent a16589e469
commit d100033e79
3 changed files with 11 additions and 11 deletions

View File

@ -41,4 +41,4 @@ STACK_ARTIFICIAL_DEVELOPMENT_DELAY_MS=50
STACK_ENABLE_HARDCODED_PASSKEY_CHALLENGE_FOR_TESTING=yes
STACK_INTEGRATION_CLIENTS_CONFIG=[{"client_id": "neon-dev", "client_secret": "neon-dev-secret", "id_token_signed_response_alg": "ES256", "redirect_uris": ["http://localhost:30000/api/v2/identity/authorize", "http://localhost:30000/api/v2/auth/authorize"]}, {"client_id": "custom-dev", "client_secret": "custom-dev-secret", "id_token_signed_response_alg": "ES256", "redirect_uris": ["http://localhost:30000/api/v2/identity/authorize", "http://localhost:30000/api/v2/auth/authorize"]}]
STACK_INTEGRATION_CLIENTS_CONFIG=[{"client_id": "neon-local", "client_secret": "neon-local-secret", "id_token_signed_response_alg": "ES256", "redirect_uris": ["http://localhost:30000/api/v2/identity/authorize", "http://localhost:30000/api/v2/auth/authorize"]}, {"client_id": "custom-local", "client_secret": "custom-local-secret", "id_token_signed_response_alg": "ES256", "redirect_uris": ["http://localhost:30000/api/v2/identity/authorize", "http://localhost:30000/api/v2/auth/authorize"]}]

View File

@ -10,7 +10,7 @@ async function authorizePart1(redirectUri: string = "http://localhost:30000/api/
method: "GET",
query: {
response_type: "code",
client_id: "custom-dev",
client_id: "custom-local",
redirect_uri: redirectUri,
state: encodeBase64Url(new TextEncoder().encode(JSON.stringify({ details: { external_project_name: 'custom-project' } }))),
code_challenge: "xf6HY7PIgoaCf_eMniSt-45brYE2J_05C9BnfIbueik",
@ -75,7 +75,7 @@ async function authorize(projectId: string) {
NiceResponse {
"status": 307,
"headers": Headers {
"location": "http://localhost:8102/api/v1/integrations/custom/oauth/idp/auth?response_type=code&client_id=custom-dev&redirect_uri=%3Cstripped+query+param%3E&state=%3Cstripped+query+param%3E&code_challenge=%3Cstripped+query+param%3E&code_challenge_method=S256&scope=openid",
"location": "http://localhost:8102/api/v1/integrations/custom/oauth/idp/auth?response_type=code&client_id=custom-local&redirect_uri=%3Cstripped+query+param%3E&state=%3Cstripped+query+param%3E&code_challenge=%3Cstripped+query+param%3E&code_challenge_method=S256&scope=openid",
<some fields may have been hidden>,
},
},
@ -169,7 +169,7 @@ it(`should not redirect to the incorrect callback URL`, async ({}) => {
NiceResponse {
"status": 307,
"headers": Headers {
"location": "http://localhost:8102/api/v1/integrations/custom/oauth/idp/auth?response_type=code&client_id=custom-dev&redirect_uri=%3Cstripped+query+param%3E&state=%3Cstripped+query+param%3E&code_challenge=%3Cstripped+query+param%3E&code_challenge_method=S256&scope=openid",
"location": "http://localhost:8102/api/v1/integrations/custom/oauth/idp/auth?response_type=code&client_id=custom-local&redirect_uri=%3Cstripped+query+param%3E&state=%3Cstripped+query+param%3E&code_challenge=%3Cstripped+query+param%3E&code_challenge_method=S256&scope=openid",
<some fields may have been hidden>,
},
},
@ -203,7 +203,7 @@ it(`should exchange the authorization code for an admin API key that works`, asy
redirect_uri: "http://localhost:30000/api/v2/auth/authorize",
},
headers: {
"Authorization": encodeBasicAuthorizationHeader("custom-dev", "custom-dev-secret")
"Authorization": encodeBasicAuthorizationHeader("custom-local", "custom-local-secret")
},
});
expect(tokenResponse).toMatchInlineSnapshot(`
@ -257,7 +257,7 @@ it(`should not exchange the authorization code when the client secret is incorre
redirect_uri: "http://localhost:30000/api/v2/auth/authorize",
},
headers: {
"Authorization": encodeBasicAuthorizationHeader("custom-dev", "wrong-secret")
"Authorization": encodeBasicAuthorizationHeader("custom-local", "wrong-secret")
},
});
expect(tokenResponse).toMatchInlineSnapshot(`

View File

@ -10,7 +10,7 @@ async function authorizePart1(redirectUri: string = "http://localhost:30000/api/
method: "GET",
query: {
response_type: "code",
client_id: "neon-dev",
client_id: "neon-local",
redirect_uri: redirectUri,
state: encodeBase64Url(new TextEncoder().encode(JSON.stringify({ details: { neon_project_name: 'neon-project' } }))),
code_challenge: "xf6HY7PIgoaCf_eMniSt-45brYE2J_05C9BnfIbueik",
@ -75,7 +75,7 @@ async function authorize(projectId: string) {
NiceResponse {
"status": 307,
"headers": Headers {
"location": "http://localhost:8102/api/v1/integrations/neon/oauth/idp/auth?response_type=code&client_id=neon-dev&redirect_uri=%3Cstripped+query+param%3E&state=%3Cstripped+query+param%3E&code_challenge=%3Cstripped+query+param%3E&code_challenge_method=S256&scope=openid",
"location": "http://localhost:8102/api/v1/integrations/neon/oauth/idp/auth?response_type=code&client_id=neon-local&redirect_uri=%3Cstripped+query+param%3E&state=%3Cstripped+query+param%3E&code_challenge=%3Cstripped+query+param%3E&code_challenge_method=S256&scope=openid",
<some fields may have been hidden>,
},
},
@ -169,7 +169,7 @@ it(`should not redirect to the incorrect callback URL`, async ({}) => {
NiceResponse {
"status": 307,
"headers": Headers {
"location": "http://localhost:8102/api/v1/integrations/neon/oauth/idp/auth?response_type=code&client_id=neon-dev&redirect_uri=%3Cstripped+query+param%3E&state=%3Cstripped+query+param%3E&code_challenge=%3Cstripped+query+param%3E&code_challenge_method=S256&scope=openid",
"location": "http://localhost:8102/api/v1/integrations/neon/oauth/idp/auth?response_type=code&client_id=neon-local&redirect_uri=%3Cstripped+query+param%3E&state=%3Cstripped+query+param%3E&code_challenge=%3Cstripped+query+param%3E&code_challenge_method=S256&scope=openid",
<some fields may have been hidden>,
},
},
@ -203,7 +203,7 @@ it(`should exchange the authorization code for an admin API key that works`, asy
redirect_uri: "http://localhost:30000/api/v2/auth/authorize",
},
headers: {
"Authorization": encodeBasicAuthorizationHeader("neon-dev", "neon-dev-secret")
"Authorization": encodeBasicAuthorizationHeader("neon-local", "neon-local-secret")
},
});
expect(tokenResponse).toMatchInlineSnapshot(`
@ -257,7 +257,7 @@ it(`should not exchange the authorization code when the client secret is incorre
redirect_uri: "http://localhost:30000/api/v2/auth/authorize",
},
headers: {
"Authorization": encodeBasicAuthorizationHeader("neon-dev", "wrong-secret")
"Authorization": encodeBasicAuthorizationHeader("neon-local", "wrong-secret")
},
});
expect(tokenResponse).toMatchInlineSnapshot(`