Fixed an issue where the user would be redirected to a localhost address because an auth url was not set in the env.
This commit is contained in:
8 files changed
+420
-71
No files matched your search
@@ -35,3 +35,17 @@ describe("generateBusinessEnv — INSTALLATION_TOKEN", () => {
|
||||
expect(envB).not.toContain("token-a");
|
||||
});
|
||||
});
|
||||
|
||||
describe("generateBusinessEnv — AUTH_URL", () => {
|
||||
it("sets AUTH_URL explicitly to the business's own https domain — not left to header-based detection", () => {
|
||||
const env = generateBusinessEnv(baseValues);
|
||||
expect(env).toContain('AUTH_URL="https://acme.example.com"');
|
||||
});
|
||||
|
||||
it("AUTH_URL always matches DOMAIN/NEXT_PUBLIC_APP_URL for a given business", () => {
|
||||
const env = generateBusinessEnv({ ...baseValues, domain: "other-business.example.com" });
|
||||
expect(env).toContain('DOMAIN="other-business.example.com"');
|
||||
expect(env).toContain('AUTH_URL="https://other-business.example.com"');
|
||||
expect(env).toContain('NEXT_PUBLIC_APP_URL="https://other-business.example.com"');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user