diff --git a/apps/relay/src/handlers.ts b/apps/relay/src/handlers.ts index 8081638..2a9c6ba 100644 --- a/apps/relay/src/handlers.ts +++ b/apps/relay/src/handlers.ts @@ -10,6 +10,7 @@ export type CreateChannelRequest = { notBefore?: string; expirationTime?: string; requestId?: string; + redirectUrl?: string; }; export type AuthenticateRequest = { diff --git a/apps/relay/src/schemas.ts b/apps/relay/src/schemas.ts index 112fae5..cfff3cb 100644 --- a/apps/relay/src/schemas.ts +++ b/apps/relay/src/schemas.ts @@ -24,6 +24,9 @@ export const createChannelRequestSchema = { requestId: { type: "string", }, + redirectUrl: { + type: "string", + }, }, required: ["siweUri", "domain"], additionalProperties: false, diff --git a/apps/relay/src/server.test.ts b/apps/relay/src/server.test.ts index 9bef4f8..1b58e04 100644 --- a/apps/relay/src/server.test.ts +++ b/apps/relay/src/server.test.ts @@ -85,12 +85,14 @@ describe("relay server", () => { const notBefore = "2023-01-01T00:00:00Z"; const expirationTime = "2023-12-31T00:00:00Z"; const requestId = "some-request-id"; + const redirectUrl = "http://some-redirect-url"; const response = await http.post(getFullUrl("/v1/channel"), { ...channelParams, nonce: customNonce, notBefore, expirationTime, requestId, + redirectUrl, }); expect(response.status).toBe(201); @@ -103,6 +105,7 @@ describe("relay server", () => { expect(params.get("notBefore")).toBe(notBefore); expect(params.get("expirationTime")).toBe(expirationTime); expect(params.get("requestId")).toBe(requestId); + expect(params.get("redirectUrl")).toBe(redirectUrl); expect(channelToken).toMatch(/[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}/); expect(nonce).toBe(customNonce); expect(url).toBe(connectUri); diff --git a/docker-compose.yml b/docker-compose.yml index b677257..1f63f89 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,8 +7,6 @@ services: command: --save 1 1 --loglevel warning --maxmemory-policy noeviction volumes: - redis-data:/data - ports: - - "6379:6379" healthcheck: test: ["CMD-SHELL", "redis-cli", "ping"] interval: 10s